From nobody Sat Apr 27 15:21:18 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521829297323860.2035748395851; Fri, 23 Mar 2018 11:21:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EEC6272C1; Fri, 23 Mar 2018 18:21:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E41C611A6; Fri, 23 Mar 2018 18:21:34 +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 565BB4CA99; Fri, 23 Mar 2018 18:21:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2NILTiU027778 for ; Fri, 23 Mar 2018 14:21:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 554371134CD6; Fri, 23 Mar 2018 18:21:29 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E9E910B0099; Fri, 23 Mar 2018 18:21:26 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Fri, 23 Mar 2018 19:20:41 +0100 Message-Id: <57606ab368823cd7647d92cc5df0c7b1a2690fac.1521829113.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Olaf Hering Subject: [libvirt] [PATCH] polkit: reintroduce check for pkcheck 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 23 Mar 2018 18:21:35 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 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=3Dcheck, but do not require it for --with-polkit=3Dyes. Signed-off-by: J=C3=A1n Tomko Reported-by: Ji=C5=99=C3=AD Denemark Reviewed-by: Andrea Bolognani --- m4/virt-polkit.m4 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/m4/virt-polkit.m4 b/m4/virt-polkit.m4 index fd729dc98..16889e163 100644 --- a/m4/virt-polkit.m4 +++ b/m4/virt-polkit.m4 @@ -25,8 +25,17 @@ AC_DEFUN([LIBVIRT_ARG_POLKIT], [ AC_DEFUN([LIBVIRT_CHECK_POLKIT], [ AC_REQUIRE([LIBVIRT_CHECK_DBUS]) =20 + if test "x$with_polkit" =3D "xcheck"; then + dnl For --with-polkit=3Dcheck, 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" =3D "x" ; then + with_polkit=3D"no" + fi + fi + if test "x$with_polkit" =3D "xyes" || test "x$with_polkit" =3D "xcheck";= then - dnl All we need to talk to polkit is D-Bus. + dnl For --with-polkit=3Dyes, all we need is D-Bus. if test "x$with_dbus" =3D "xyes" ; then AC_DEFINE_UNQUOTED([WITH_POLKIT], 1, [use PolicyKit for UNIX socket access checks]) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list