[libvirt] [PATCH v2] virGetGroupList: always include the primary group

Guido Günther agx at sigxcpu.org
Tue Aug 6 20:53:01 UTC 2013


On Tue, Aug 06, 2013 at 10:54:36AM -0600, Eric Blake wrote:
> On 08/06/2013 10:36 AM, Guido Günther wrote:
> > The change from initgroups to virGetGroupList/setgroups in
> > cab36cfe71ba83b71e536ba5c98e596f02b697b0 dropped the primary group from
> > processes group list iff the passed in group to virGetGroupList differs
> > from the user's primary group.
> > 
> > So always include the primary group to bring back the old behaviour.
> > 
> > Debian has the kvm group as primary group but uses
> > libvirt-qemu:libvirt-qemu as user:group to run the kvm process so
> > without this change the /dev/kvm is inaccessible.
> > ---
> 
> > +        for (int i = 0; i < ret; i++) {
> > +            if((*list)[i] == gid)
> 
> space after 'if' (hmm, that should be part of syntax-check)
> 
> ACK with that fixed.

Fixed and pushed. Thanks,
 -- Guido

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





More information about the libvir-list mailing list