[PATCH 2/3] Merge WITH_POLKIT1 and WITH_POLKIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is just one polkit now.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 m4/virt-polkit.m4             | 6 ------
 src/access/Makefile.inc.am    | 6 +++---
 src/access/viraccessmanager.c | 4 ++--
 src/util/virpolkit.c          | 6 +++---
 tests/Makefile.am             | 4 ++--
 5 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/m4/virt-polkit.m4 b/m4/virt-polkit.m4
index 9426c7d5d..5c2a3c1e3 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 c68ba5f04..6d57ca1a1 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 cbfefb9d4..c268ec57f 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 2e8660188..198439cea 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 d794df3e5..6ca34092c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -250,9 +250,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
-- 
2.16.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux