mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-03 04:45:46 +00:00
qemu: Do not allow others into per-VM subdirectories
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
64c6695f1a
commit
192a139489
@ -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,
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user