提交 5123e6ed 编写于 作者: J Ján Tomko

polkit: reintroduce check for pkcheck

Commit 2499d1a0 was too eager and possibly enabled polkit
on all platforms with D-Bus, regardless of whether they use polkit.

Reintroduce the usage of pkcheck as a witness for --with-polkit=check,
but do not require it for --with-polkit=yes.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reported-by: NJiří Denemark <jdenemar@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 c28d837c
......@@ -25,8 +25,17 @@ AC_DEFUN([LIBVIRT_ARG_POLKIT], [
AC_DEFUN([LIBVIRT_CHECK_POLKIT], [
AC_REQUIRE([LIBVIRT_CHECK_DBUS])
if test "x$with_polkit" = "xcheck"; then
dnl For --with-polkit=check, also require the pkcheck binary, even
dnl though we talk to polkit directly over D-Bus.
AC_PATH_PROG([PKCHECK_PATH], [pkcheck], [], [$LIBVIRT_SBIN_PATH])
if test "x$PKCHECK_PATH" = "x" ; then
with_polkit="no"
fi
fi
if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
dnl All we need to talk to polkit is D-Bus.
dnl For --with-polkit=yes, all we need is D-Bus.
if test "x$with_dbus" = "xyes" ; then
AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册