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

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

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

Attachment: signature.asc
Description: OpenPGP digital signature

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