Re: [libvirt] [PATCH] util: Don't try to fchown files opened as non-root

2011-07-08 Thread Jiri Denemark
On Fri, Jul 08, 2011 at 07:46:06 -0600, Eric Blake wrote: > On 07/08/2011 07:30 AM, Jiri Denemark wrote: > > When virFileOpenAs is called with VIR_FILE_OPEN_AS_UID flag and uid/gid > > different from root/root while libvirtd is running as root, we fork a > > new child, change its effective UID/GID

Re: [libvirt] [PATCH] util: Don't try to fchown files opened as non-root

2011-07-08 Thread Eric Blake
On 07/08/2011 07:30 AM, Jiri Denemark wrote: > When virFileOpenAs is called with VIR_FILE_OPEN_AS_UID flag and uid/gid > different from root/root while libvirtd is running as root, we fork a > new child, change its effective UID/GID to uid/gid and run > virFileOpenAsNoFork. It doesn't make any sens

[libvirt] [PATCH] util: Don't try to fchown files opened as non-root

2011-07-08 Thread Jiri Denemark
When virFileOpenAs is called with VIR_FILE_OPEN_AS_UID flag and uid/gid different from root/root while libvirtd is running as root, we fork a new child, change its effective UID/GID to uid/gid and run virFileOpenAsNoFork. It doesn't make any sense to fchown() the opened file in this case since we a