提交 192a1394 编写于 作者: M Martin Kletzander

qemu: Do not allow others into per-VM subdirectories

Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 64c6695f
...@@ -4734,7 +4734,7 @@ int qemuProcessStart(virConnectPtr conn, ...@@ -4734,7 +4734,7 @@ int qemuProcessStart(virConnectPtr conn,
if (virAsprintf(&tmppath, "%s/domain-%s", cfg->libDir, vm->def->name) < 0) if (virAsprintf(&tmppath, "%s/domain-%s", cfg->libDir, vm->def->name) < 0)
goto cleanup; goto cleanup;
if (virFileMakePath(tmppath) < 0) { if (virFileMakePathWithMode(tmppath, 0750) < 0) {
virReportSystemError(errno, _("Cannot create directory '%s'"), tmppath); virReportSystemError(errno, _("Cannot create directory '%s'"), tmppath);
goto cleanup; goto cleanup;
} }
...@@ -4749,7 +4749,7 @@ int qemuProcessStart(virConnectPtr conn, ...@@ -4749,7 +4749,7 @@ int qemuProcessStart(virConnectPtr conn,
cfg->channelTargetDir, vm->def->name) < 0) cfg->channelTargetDir, vm->def->name) < 0)
goto cleanup; goto cleanup;
if (virFileMakePath(tmppath) < 0) { if (virFileMakePathWithMode(tmppath, 0750) < 0) {
virReportSystemError(errno, _("Cannot create directory '%s'"), tmppath); virReportSystemError(errno, _("Cannot create directory '%s'"), tmppath);
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册