]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Do not allow others into per-VM subdirectories
authorMartin Kletzander <mkletzan@redhat.com>
Sat, 12 Sep 2015 13:00:58 +0000 (15:00 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 14 Sep 2015 08:06:00 +0000 (10:06 +0200)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_process.c

index d9a0942c4dfd9b1419f25688cc2db8ede73de1ae..ce2c70cb3fd16990288262dfe71345fe56143ad1 100644 (file)
@@ -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;
     }