[libvirt] [PATCH v3 2/3] util: Introduce API's for Polkit text authentication

Martin Kletzander mkletzan at redhat.com
Mon Feb 22 15:41:41 UTC 2016

On Fri, Feb 12, 2016 at 12:12:32PM -0500, John Ferlan wrote:
>Introduce virPolkitAgentCreate and virPolkitAgentDestroy
>virPolkitAgentCreate will run the polkit pkttyagent image as an asynchronous
>command in order to handle the local agent authentication via stdin/stdout.
>The code makes use of the pkttyagent --notify-fd mechanism to let it know
>when the agent is successfully registered.
>virPolkitAgentDestroy will close the command effectively reaping our
>child process
>Needed to move around or add the "#include vircommand.h" since,
>virpolkit.h now uses it.

I have literally no idea how PolicyKit is used, so I don't feel like the
right person to review more than the first patch (which looks fine).
But this is something I can't let go unnoticed, sorry.  If you are using
virCommandPtr in virpolkit.h, then that file should also include
vircommand.h.  Then you can remove it from virpolkit.c (if it is
included there) and you don't need to reorganize the includes or touch
them in other files.  And anyone can include virpolkit.h without needing
to care about any dependencies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160222/1b5f7680/attachment-0001.sig>

More information about the libvir-list mailing list