Re: [PATCHv2 05/15] util: make virSetUIDGID a NOP only when uid or gid is -1

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

 



On 02/12/2013 01:15 PM, Laine Stump wrote:
> Rather than treating uid:gid of 0:0 as a NOP, we blindly pass that
> through to the lower layers. However, we *do* check for a requested
> value of "-1" to mean "don't change this setting". setregid() and
> setreuid() already interpret -1 as a NOP, so this is just an
> optimization, but we are also calling getpwuid_r and initgroups, and
> it's unclear what the former would do with a uid of -1.
> ---
> Change from V1: 
> * only bypass uid/gid setting if they are -1 rather than > 0
> * cast -1 to ([gu]id_t) when comparing to a [gu]id_t
> 

ACK.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]