Re: [libvirt] [PATCH 3/4] virLockManagerLockDaemonAcquire: Duplicate client FD with CLOEXEC flag

2018-09-26 Thread Michal Privoznik
On 09/25/2018 06:29 PM, John Ferlan wrote: > > > On 9/21/18 5:29 AM, Michal Privoznik wrote: >> There is one caller (virSecurityManagerMetadataLock) which >> duplicates the connection FD and wants to have the flag set. >> However, trying to set the flag after dup() is not safe as >> another

Re: [libvirt] [PATCH 3/4] virLockManagerLockDaemonAcquire: Duplicate client FD with CLOEXEC flag

2018-09-25 Thread John Ferlan
On 9/21/18 5:29 AM, Michal Privoznik wrote: > There is one caller (virSecurityManagerMetadataLock) which > duplicates the connection FD and wants to have the flag set. > However, trying to set the flag after dup() is not safe as > another thread might fork() meanwhile. Therefore, switch to >

[libvirt] [PATCH 3/4] virLockManagerLockDaemonAcquire: Duplicate client FD with CLOEXEC flag

2018-09-21 Thread Michal Privoznik
There is one caller (virSecurityManagerMetadataLock) which duplicates the connection FD and wants to have the flag set. However, trying to set the flag after dup() is not safe as another thread might fork() meanwhile. Therefore, switch to duplicating with the flag set and only let callers refine