Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Tools:2.3
qemu
0033-qga-unlink-just-created-guest-file-.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0033-qga-unlink-just-created-guest-file-.patch of Package qemu
From 8a5a569a54354210207e70eb01ae5070cc0df75b Mon Sep 17 00:00:00 2001 From: Laszlo Ersek <lersek@redhat.com> Date: Wed, 8 May 2013 17:31:36 +0200 Subject: [PATCH] qga: unlink just created guest-file if fchmod() or fdopen() fails on it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Andreas Färber <afaerber@suse.de> --- qga/commands-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 47bbad2..5bdb522 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -235,6 +235,9 @@ safe_open_or_create(const char *path, const char *mode, Error **err) } close(fd); + if (oflag & O_CREAT) { + unlink(path); + } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor