mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-08 14:29:56 +00: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] : "");
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
no_memory:
|
||||
|
Loading…
Reference in New Issue
Block a user