提交 5f7861ca 编写于 作者: J Ján Tomko 提交者: Daniel Veillard

qemu: add -sandbox to command line if requested

上级 1ccf2227
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册