Re: [PATCH 7/7] util: Make client-side polkit work even with polkit disabled

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

 



On a Sunday in 2021, Martin Kletzander wrote:
The reason for this is twofold:

- the polkit build option is documented for UNIX socket access checks

- there is no server-side change or dbus call done when enabling this as it only
 starts a polkit agent on the client-side (actually only in virsh) and does not
 need any requirements (starting is skipped if pkttyagent is not installed)

Also move the conditional implementation to the bottom of the file so that it
does not look like the whole file is build conditionally and the common
functions are at the top.


Please, separate the code movement from the functional changes, to make
it obvious what this commit does.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
src/util/virpolkit.c | 240 ++++++++++++++++++++-----------------------
1 file changed, 109 insertions(+), 131 deletions(-)

diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c
index 7156adc10c0a..b51104100796 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -21,6 +21,7 @@

#include <config.h>
#include <fcntl.h>
+#include <poll.h>

This does not compile on mingw:
../src/util/virpolkit.c:24:10: fatal error: poll.h: No such file or directory
   24 | #include <poll.h>
      |          ^~~~~~~~

Jano

#include <unistd.h>

#include "virpolkit.h"

Attachment: signature.asc
Description: PGP signature


[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