mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 05:47:15 +03:00
qemu: add -sandbox to command line if requested
This commit is contained in:
parent
1ccf22277b
commit
5f7861ca3f
@ -6528,6 +6528,17 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
? qemucmd->env_value[i] : "");
|
? qemucmd->env_value[i] : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qemuCapsGet(caps, QEMU_CAPS_SECCOMP_SANDBOX)) {
|
||||||
|
if (driver->seccompSandbox == 0)
|
||||||
|
virCommandAddArgList(cmd, "-sandbox", "off", NULL);
|
||||||
|
else if (driver->seccompSandbox > 0)
|
||||||
|
virCommandAddArgList(cmd, "-sandbox", "on", NULL);
|
||||||
|
} else if (driver->seccompSandbox > 0) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("QEMU does not support seccomp sandboxes"));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
|
|
||||||
no_memory:
|
no_memory:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user