From: Martin Kletzander Date: Sat, 12 Sep 2015 13:00:58 +0000 (+0200) Subject: qemu: Do not allow others into per-VM subdirectories X-Git-Tag: v1.2.20-rc1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=192a13948905668955ff39e32d4622f8511fadf0;p=thirdparty%2Flibvirt.git qemu: Do not allow others into per-VM subdirectories Signed-off-by: Martin Kletzander --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d9a0942c4d..ce2c70cb3f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4734,7 +4734,7 @@ int qemuProcessStart(virConnectPtr conn, if (virAsprintf(&tmppath, "%s/domain-%s", cfg->libDir, vm->def->name) < 0) goto cleanup; - if (virFileMakePath(tmppath) < 0) { + if (virFileMakePathWithMode(tmppath, 0750) < 0) { virReportSystemError(errno, _("Cannot create directory '%s'"), tmppath); goto cleanup; } @@ -4749,7 +4749,7 @@ int qemuProcessStart(virConnectPtr conn, cfg->channelTargetDir, vm->def->name) < 0) goto cleanup; - if (virFileMakePath(tmppath) < 0) { + if (virFileMakePathWithMode(tmppath, 0750) < 0) { virReportSystemError(errno, _("Cannot create directory '%s'"), tmppath); goto cleanup; }