On 09/11/2014 06:05 PM, John Ferlan wrote:
> With eblake's help - adjust the checks for stdinfd/stdoutfd to ensure the
> values are within the range we expect; otherwise the dup2()'s and subsequent
> VIR_CLOSE() calls cause Coverity to believe there's a resource leak.
> 
> Signed-off-by: John Ferlan <[email protected]>
> ---
>  daemon/libvirtd.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

ACK.  This means that if anyone tries to do something crazy like
'libvirtd 0<&-' with stdin closed, and the OS doesn't auto-reopen an fd,
then spawning into a daemon will now fail where it previously worked.
But this is a _good_ thing, as it is much easier to reason about
programs that prohibit being started without something open at all three
standard descriptors, and since POSIX states that it is undefined
behavior if you exec a process without open fds.

-- 
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
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to