From nobody Sun Feb 8 17:42:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520414981965902.8144280445598; Wed, 7 Mar 2018 01:29:41 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 883577FEB4; Wed, 7 Mar 2018 09:29:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 588195D753; Wed, 7 Mar 2018 09:29:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E5961181B9FC; Wed, 7 Mar 2018 09:29:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w279TaNZ004916 for ; Wed, 7 Mar 2018 04:29:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 00FCA2026990; Wed, 7 Mar 2018 09:29:36 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CF1A202698A for ; Wed, 7 Mar 2018 09:29:35 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 7 Mar 2018 10:29:31 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] Merge WITH_POLKIT1 and WITH_POLKIT X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 07 Mar 2018 09:29:40 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 There is just one polkit now. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Andrea Bolognani --- 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], [ =20 PKCHECK_PATH=3D =20 - with_polkit1=3Dno - if test "x$with_polkit" =3D "xyes" || test "x$with_polkit" =3D "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" =3D "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=3D"yes" - with_polkit1=3D"yes" else if test "x$with_polkit" =3D "xcheck" ; then with_polkit=3Dno @@ -56,7 +51,6 @@ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [ fi =20 AM_CONDITIONAL([WITH_POLKIT], [test "x$with_polkit" =3D "xyes"]) - AM_CONDITIONAL([WITH_POLKIT1], [test "x$with_polkit1" =3D "xyes"]) ]) =20 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/viracces= sperm.h \ $(srcdir)/access/genpolkit.pl Makefile.am $(AM_V_GEN)$(PERL) $(srcdir)/access/genpolkit.pl < $< > $@ || rm -f $@ =20 -if WITH_POLKIT1 +if WITH_POLKIT libvirt_driver_access_la_SOURCES +=3D $(ACCESS_DRIVER_POLKIT_SOURCES) =20 polkitactiondir =3D $(datadir)/polkit-1/actions @@ -74,9 +74,9 @@ endif WITH_LIBVIRTD =20 CLEANFILES +=3D $(ACCESS_DRIVER_POLKIT_POLICY) BUILT_SOURCES +=3D $(ACCESS_DRIVER_POLKIT_POLICY) -else ! WITH_POLKIT1 +else ! WITH_POLKIT EXTRA_DIST +=3D $(ACCESS_DRIVER_POLKIT_SOURCES) -endif ! WITH_POLKIT1 +endif ! WITH_POLKIT =20 =20 BUILT_SOURCES +=3D \ 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(vi= rAccessDriverPtr drv) =20 static virAccessDriverPtr accessDrivers[] =3D { &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 @@ =20 VIR_LOG_INIT("util.polkit"); =20 -#if WITH_POLKIT1 +#if WITH_POLKIT =20 struct _virPolkitAgent { virCommandPtr cmd; @@ -206,7 +206,7 @@ virPolkitAgentCreate(void) } =20 =20 -#else /* ! WITH_POLKIT1 */ +#else /* ! WITH_POLKIT */ =20 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 +=3D virdbustest \ virsystemdtest \ $(NULL) test_libraries +=3D virdbusmock.la -if WITH_POLKIT1 +if WITH_POLKIT test_programs +=3D virpolkittest -endif WITH_POLKIT1 +endif WITH_POLKIT endif WITH_DBUS =20 if WITH_SECDRIVER_SELINUX --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list