]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: chown autoDumpPath on driver startup
authorCole Robinson <crobinso@redhat.com>
Fri, 24 Apr 2015 00:21:21 +0000 (20:21 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 24 Apr 2015 14:30:41 +0000 (10:30 -0400)
Not sure if this is required, but it makes things consistent with the
rest of the directories.

src/qemu/qemu_driver.c

index 989c20c8dad171722966f0a121ad7eb230fb2fdf..101f9dd1ff5924108887fba9e97fb237ace8d52f 100644 (file)
@@ -789,6 +789,14 @@ qemuStateInitialize(bool privileged,
                                  (int) cfg->group);
             goto error;
         }
+        if (chown(cfg->autoDumpPath, cfg->user, cfg->group) < 0) {
+            virReportSystemError(errno,
+                                 _("unable to set ownership of '%s' to %d:%d"),
+                                 cfg->autoDumpPath, (int) cfg->user,
+                                 (int) cfg->group);
+            goto error;
+        }
+
         run_uid = cfg->user;
         run_gid = cfg->group;
     }