[libvirt] [PATCHv2 ACKed 06/15] qemu: replace exec hook with virCommandSetUID/GID in qemuCaps*

Eric Blake eblake at redhat.com
Wed Feb 13 00:20:17 UTC 2013


On 02/12/2013 01:15 PM, Laine Stump wrote:
> Setting the uid/gid of the child process was the only thing done by
> the hook function in this case, and that can now be done more simply
> with virCommandSetUID/GID.
> ---
> Change from V1: rebased.
> 

>  static virCommandPtr
>  virQEMUCapsProbeCommand(const char *qemu,
>                          virQEMUCapsPtr qemuCaps,
> -                        virQEMUCapsHookDataPtr hookData)
> +                        uid_t runUid, gid_t runGid)
>  {
>      virCommandPtr cmd = virCommandNew(qemu);
>  
> @@ -322,7 +295,8 @@ virQEMUCapsProbeCommand(const char *qemu,
>  
>      virCommandAddEnvPassCommon(cmd);
>      virCommandClearCaps(cmd);
> -    virCommandSetPreExecHook(cmd, virQEMUCapsHook, hookData);
> +    virCommandSetGID(cmd, runGid);
> +    virCommandSetUID(cmd, runUid);
>  

Back to my argument in 4/15 - it looks funny to see
virQEMUCapsProbeCommand taking two arguments, just to call into two
virCommandSet* calls with one argument, just to be combined back into
virSetUIDGID with two arguments.  But again, I'm not going to insist on
a respin for a cosmetic difference.

ACK still stands.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130212/a59b2f06/attachment-0001.sig>


More information about the libvir-list mailing list