diff --git a/m4/virt-polkit.m4 b/m4/virt-polkit.m4 index 9426c7d5dabae888b81f5b548985e175853bc688..5c2a3c1e3a0fb4cbb0fc281089ec8b0a73a74f65 100644 --- a/m4/virt-polkit.m4 +++ b/m4/virt-polkit.m4 @@ -27,8 +27,6 @@ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [ PKCHECK_PATH= - with_polkit1=no - if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then dnl Check for new polkit first. We directly talk over DBus dnl but we use existence of pkcheck binary as a sign that @@ -40,10 +38,7 @@ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [ if test "x$with_dbus" = "xyes" ; then AC_DEFINE_UNQUOTED([WITH_POLKIT], 1, [use PolicyKit for UNIX socket access checks]) - AC_DEFINE_UNQUOTED([WITH_POLKIT1], 1, - [use PolicyKit for UNIX socket access checks]) with_polkit="yes" - with_polkit1="yes" else if test "x$with_polkit" = "xcheck" ; then with_polkit=no @@ -56,7 +51,6 @@ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [ fi AM_CONDITIONAL([WITH_POLKIT], [test "x$with_polkit" = "xyes"]) - AM_CONDITIONAL([WITH_POLKIT1], [test "x$with_polkit1" = "xyes"]) ]) AC_DEFUN([LIBVIRT_RESULT_POLKIT], [ diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am index c68ba5f04485d628aa8188cf4714a19e731303fc..6d57ca1a1b338a2655b0a8c6d32f4b50303522d1 100644 --- a/src/access/Makefile.inc.am +++ b/src/access/Makefile.inc.am @@ -64,7 +64,7 @@ $(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \ $(srcdir)/access/genpolkit.pl Makefile.am $(AM_V_GEN)$(PERL) $(srcdir)/access/genpolkit.pl < $< > $@ || rm -f $@ -if WITH_POLKIT1 +if WITH_POLKIT libvirt_driver_access_la_SOURCES += $(ACCESS_DRIVER_POLKIT_SOURCES) polkitactiondir = $(datadir)/polkit-1/actions @@ -74,9 +74,9 @@ endif WITH_LIBVIRTD CLEANFILES += $(ACCESS_DRIVER_POLKIT_POLICY) BUILT_SOURCES += $(ACCESS_DRIVER_POLKIT_POLICY) -else ! WITH_POLKIT1 +else ! WITH_POLKIT EXTRA_DIST += $(ACCESS_DRIVER_POLKIT_SOURCES) -endif ! WITH_POLKIT1 +endif ! WITH_POLKIT BUILT_SOURCES += \ diff --git a/src/access/viraccessmanager.c b/src/access/viraccessmanager.c index cbfefb9d4f5ed86585a1d5fd8d68b85835724e45..c268ec57f7ba2d97412c5ffdc2879098827a5dfe 100644 --- a/src/access/viraccessmanager.c +++ b/src/access/viraccessmanager.c @@ -23,7 +23,7 @@ #include "viraccessmanager.h" #include "viraccessdrivernop.h" #include "viraccessdriverstack.h" -#if WITH_POLKIT1 +#if WITH_POLKIT # include "viraccessdriverpolkit.h" #endif #include "viralloc.h" @@ -112,7 +112,7 @@ static virAccessManagerPtr virAccessManagerNewDriver(virAccessDriverPtr drv) static virAccessDriverPtr accessDrivers[] = { &accessDriverNop, -#if WITH_POLKIT1 +#if WITH_POLKIT &accessDriverPolkit, #endif }; diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c index 2e8660188bb5fd87f4fec9f1502d316378081668..198439cea2915c23874436a7f8b6458a11780346 100644 --- a/src/util/virpolkit.c +++ b/src/util/virpolkit.c @@ -35,7 +35,7 @@ VIR_LOG_INIT("util.polkit"); -#if WITH_POLKIT1 +#if WITH_POLKIT struct _virPolkitAgent { virCommandPtr cmd; @@ -206,7 +206,7 @@ virPolkitAgentCreate(void) } -#else /* ! WITH_POLKIT1 */ +#else /* ! WITH_POLKIT */ int virPolkitCheckAuth(const char *actionid ATTRIBUTE_UNUSED, pid_t pid ATTRIBUTE_UNUSED, @@ -236,4 +236,4 @@ virPolkitAgentCreate(void) _("polkit text authentication agent unavailable")); return NULL; } -#endif /* WITH_POLKIT1 */ +#endif /* WITH_POLKIT */ diff --git a/tests/Makefile.am b/tests/Makefile.am index 11a9b904ed8a74b6faa8c912611b38a614ddd656..15c8cc8158c09ac482fdb79a88e6285ad85a79e4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -251,9 +251,9 @@ test_programs += virdbustest \ virsystemdtest \ $(NULL) test_libraries += virdbusmock.la -if WITH_POLKIT1 +if WITH_POLKIT test_programs += virpolkittest -endif WITH_POLKIT1 +endif WITH_POLKIT endif WITH_DBUS if WITH_SECDRIVER_SELINUX