]> git.ipfire.org Git - thirdparty/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>
Mon, 27 Apr 2015 23:36:21 +0000 (19:36 -0400)
Not sure if this is required, but it makes things consistent with the
rest of the directories.

(cherry picked from commit db3ccd582c94f8c5a046f2f9be92a1ad95bc4753)

src/qemu/qemu_driver.c

index 2738518b9c5b34cd104fe7fc5e06aad07ce105e2..2708b1c3e21054f88114e328e6b40517fdf59e87 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;
     }