]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix iohelper usage with streams opened for read
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 10 May 2013 13:45:05 +0000 (14:45 +0100)
committerEric Blake <eblake@redhat.com>
Tue, 14 May 2013 22:02:29 +0000 (16:02 -0600)
commita36dbe64754a5088d6237e90c529baf92f798932
treef90a8be9c2f0153efa411d5fc3715797e43afe47
parentce902dcaf003e94b0defb452be243f6e36061ef3
Fix iohelper usage with streams opened for read

bz #960879

In b2878ed860ceceec3cd6481424fed0b543b687cd we added the O_NOCTTY
flag when opening files in the stream code. Unfortunately a later
piece of code was comparing the flags == O_RDONLY, without masking
out the non-access mode flags. This broke the iohelper when used
with streams for read, since it caused us to attach the stream
output pipe to the stream input FD instead of output FD :-(

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit a2214c5257d3bd7b086ce04aca1648e8ff05ee96)
src/fdstream.c