Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
cf7ac00e
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cf7ac00e
编写于
1月 08, 2013
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename HAVE_POLKIT to WITH_POLKIT
上级
14e3d7d2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
26 addition
and
26 deletion
+26
-26
configure.ac
configure.ac
+7
-7
daemon/Makefile.am
daemon/Makefile.am
+3
-3
daemon/libvirtd-config.c
daemon/libvirtd-config.c
+3
-3
daemon/remote.c
daemon/remote.c
+5
-5
src/remote/remote_driver.c
src/remote/remote_driver.c
+8
-8
未找到文件。
configure.ac
浏览文件 @
cf7ac00e
...
...
@@ -1113,9 +1113,9 @@ if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
AC_PATH_PROG([PKCHECK_PATH],[pkcheck], [], [/usr/sbin:$PATH])
if test "x$PKCHECK_PATH" != "x" ; then
AC_DEFINE_UNQUOTED([PKCHECK_PATH],["$PKCHECK_PATH"],[Location of pkcheck program])
AC_DEFINE_UNQUOTED([
HAVE
_POLKIT], 1,
AC_DEFINE_UNQUOTED([
WITH
_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
AC_DEFINE_UNQUOTED([
HAVE
_POLKIT1], 1,
AC_DEFINE_UNQUOTED([
WITH
_POLKIT1], 1,
[use PolicyKit for UNIX socket access checks])
with_polkit="yes"
with_polkit1="yes"
...
...
@@ -1131,9 +1131,9 @@ if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
fi
])
if test "x$with_polkit" = "xyes" ; then
AC_DEFINE_UNQUOTED([
HAVE
_POLKIT], 1,
AC_DEFINE_UNQUOTED([
WITH
_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
AC_DEFINE_UNQUOTED([
HAVE
_POLKIT0], 1,
AC_DEFINE_UNQUOTED([
WITH
_POLKIT0], 1,
[use PolicyKit for UNIX socket access checks])
old_CFLAGS=$CFLAGS
...
...
@@ -1152,9 +1152,9 @@ if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
fi
fi
fi
AM_CONDITIONAL([
HAVE
_POLKIT], [test "x$with_polkit" = "xyes"])
AM_CONDITIONAL([
HAVE
_POLKIT0], [test "x$with_polkit0" = "xyes"])
AM_CONDITIONAL([
HAVE
_POLKIT1], [test "x$with_polkit1" = "xyes"])
AM_CONDITIONAL([
WITH
_POLKIT], [test "x$with_polkit" = "xyes"])
AM_CONDITIONAL([
WITH
_POLKIT0], [test "x$with_polkit0" = "xyes"])
AM_CONDITIONAL([
WITH
_POLKIT1], [test "x$with_polkit1" = "xyes"])
AC_SUBST([POLKIT_CFLAGS])
AC_SUBST([POLKIT_LIBS])
...
...
daemon/Makefile.am
浏览文件 @
cf7ac00e
...
...
@@ -170,8 +170,8 @@ endif
libvirtd_LDADD
+=
../src/libvirt.la
if
HAVE
_POLKIT
if
HAVE
_POLKIT0
if
WITH
_POLKIT
if
WITH
_POLKIT0
policydir
=
$(datadir)
/PolicyKit/policy
policyauth
=
auth_admin_keep_session
else
...
...
@@ -201,7 +201,7 @@ uninstall-local:: uninstall-init-redhat uninstall-init-systemd uninstall-init-up
rmdir
$(DESTDIR)$(localstatedir)
/run/libvirt
||
:
rmdir
$(DESTDIR)$(localstatedir)
/lib/libvirt
||
:
if
HAVE
_POLKIT
if
WITH
_POLKIT
install-data-polkit
::
$(MKDIR_P)
$(DESTDIR)$(policydir)
$(INSTALL_DATA)
libvirtd.policy
$(DESTDIR)$(policydir)
/org.libvirt.unix.policy
...
...
daemon/libvirtd-config.c
浏览文件 @
cf7ac00e
...
...
@@ -242,7 +242,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
goto
no_memory
;
/* Only default to PolicyKit if running as root */
#if
HAVE
_POLKIT
#if
WITH
_POLKIT
if
(
privileged
)
{
data
->
auth_unix_rw
=
REMOTE_AUTH_POLKIT
;
data
->
auth_unix_ro
=
REMOTE_AUTH_POLKIT
;
...
...
@@ -250,7 +250,7 @@ daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
#endif
data
->
auth_unix_rw
=
REMOTE_AUTH_NONE
;
data
->
auth_unix_ro
=
REMOTE_AUTH_NONE
;
#if
HAVE
_POLKIT
#if
WITH
_POLKIT
}
#endif
...
...
@@ -374,7 +374,7 @@ daemonConfigLoadOptions(struct daemonConfig *data,
if
(
remoteConfigGetAuth
(
conf
,
"auth_unix_rw"
,
&
data
->
auth_unix_rw
,
filename
)
<
0
)
goto
error
;
#if
HAVE
_POLKIT
#if
WITH
_POLKIT
/* Change default perms to be wide-open if PolicyKit is enabled.
* Admin can always override in config file
*/
...
...
daemon/remote.c
浏览文件 @
cf7ac00e
...
...
@@ -24,7 +24,7 @@
#include "virerror.h"
#if
HAVE
_POLKIT0
#if
WITH
_POLKIT0
# include <polkit/polkit.h>
# include <polkit-dbus/polkit-dbus.h>
#endif
...
...
@@ -2802,7 +2802,7 @@ remoteDispatchAuthSaslStep(virNetServerPtr server ATTRIBUTE_UNUSED,
#if
HAVE
_POLKIT1
#if
WITH
_POLKIT1
static
int
remoteDispatchAuthPolkit
(
virNetServerPtr
server
ATTRIBUTE_UNUSED
,
virNetServerClientPtr
client
,
...
...
@@ -2912,7 +2912,7 @@ authdeny:
client
,
REMOTE_AUTH_POLKIT
,
ident
);
goto
error
;
}
#elif
HAVE
_POLKIT0
#elif
WITH
_POLKIT0
static
int
remoteDispatchAuthPolkit
(
virNetServerPtr
server
ATTRIBUTE_UNUSED
,
virNetServerClientPtr
client
,
...
...
@@ -3056,7 +3056,7 @@ authdeny:
goto
error
;
}
#else
/* !
HAVE
_POLKIT0 & !HAVE_POLKIT1*/
#else
/* !
WITH
_POLKIT0 & !HAVE_POLKIT1*/
static
int
remoteDispatchAuthPolkit
(
virNetServerPtr
server
ATTRIBUTE_UNUSED
,
...
...
@@ -3071,7 +3071,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetMessageSaveError
(
rerr
);
return
-
1
;
}
#endif
/*
HAVE
_POLKIT1 */
#endif
/*
WITH
_POLKIT1 */
/***************************************************************
...
...
src/remote/remote_driver.c
浏览文件 @
cf7ac00e
...
...
@@ -122,10 +122,10 @@ static int remoteAuthenticate(virConnectPtr conn, struct private_data *priv,
static
int
remoteAuthSASL
(
virConnectPtr
conn
,
struct
private_data
*
priv
,
virConnectAuthPtr
auth
,
const
char
*
mech
);
#endif
#if
HAVE
_POLKIT
#if
WITH
_POLKIT
static
int
remoteAuthPolkit
(
virConnectPtr
conn
,
struct
private_data
*
priv
,
virConnectAuthPtr
auth
);
#endif
/*
HAVE
_POLKIT */
#endif
/*
WITH
_POLKIT */
static
virDomainPtr
get_nonnull_domain
(
virConnectPtr
conn
,
remote_nonnull_domain
domain
);
static
virNetworkPtr
get_nonnull_network
(
virConnectPtr
conn
,
remote_nonnull_network
network
);
...
...
@@ -3504,7 +3504,7 @@ remoteAuthenticate(virConnectPtr conn, struct private_data *priv,
}
#endif
#if
HAVE
_POLKIT
#if
WITH
_POLKIT
case
REMOTE_AUTH_POLKIT
:
if
(
remoteAuthPolkit
(
conn
,
priv
,
auth
)
<
0
)
{
VIR_FREE
(
ret
.
types
.
types_val
);
...
...
@@ -4075,8 +4075,8 @@ remoteAuthSASL(virConnectPtr conn, struct private_data *priv,
#endif
/* WITH_SASL */
#if
HAVE
_POLKIT
# if
HAVE
_POLKIT1
#if
WITH
_POLKIT
# if
WITH
_POLKIT1
static
int
remoteAuthPolkit
(
virConnectPtr
conn
,
struct
private_data
*
priv
,
virConnectAuthPtr
auth
ATTRIBUTE_UNUSED
)
...
...
@@ -4094,7 +4094,7 @@ remoteAuthPolkit(virConnectPtr conn, struct private_data *priv,
VIR_DEBUG
(
"PolicyKit-1 authentication complete"
);
return
0
;
}
# elif
HAVE
_POLKIT0
# elif
WITH
_POLKIT0
/* Perform the PolicyKit authentication process
*/
static
int
...
...
@@ -4156,8 +4156,8 @@ out:
VIR_DEBUG
(
"PolicyKit-0 authentication complete"
);
return
0
;
}
# endif
/*
HAVE
_POLKIT0 */
#endif
/*
HAVE
_POLKIT */
# endif
/*
WITH
_POLKIT0 */
#endif
/*
WITH
_POLKIT */
/*----------------------------------------------------------------------*/
static
int
remoteDomainEventRegister
(
virConnectPtr
conn
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录