From: Cole Robinson Date: Fri, 24 Apr 2015 00:21:21 +0000 (-0400) Subject: qemu: chown autoDumpPath on driver startup X-Git-Tag: v1.2.9.3~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=116742eeb54119f4bb768784a7f9905e7d30b4eb;p=thirdparty%2Flibvirt.git qemu: chown autoDumpPath on driver startup Not sure if this is required, but it makes things consistent with the rest of the directories. (cherry picked from commit db3ccd582c94f8c5a046f2f9be92a1ad95bc4753) --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bbeba8ddcd..3cb7a8301c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -788,6 +788,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; }