]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
qga: unlink just created guest-file if fchmod() or fdopen() fails on it
authorLaszlo Ersek <lersek@redhat.com>
Wed, 8 May 2013 15:31:36 +0000 (17:31 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 14 May 2013 21:18:25 +0000 (16:18 -0500)
commit1d7723ffc7b93dc2f9400c4fe26b5c4506cfc661
treec50598fef6e5ed29f8cfda74152a8a13cb3d09f7
parent67b460a404eedf8a1f098fdb52cd40b2e6d48ef1
qga: unlink just created guest-file if fchmod() or fdopen() fails on it

We shouldn't allow guest filesystem pollution on error paths.

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit 2b720018060179b394f8ce736983373ab80dd37c)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-posix.c