[libvirt] [PATCH 2/2] qemu: only pass -sandbox off if supported
Ján Tomko
jtomko at redhat.com
Fri May 18 13:03:04 UTC 2018
This way we don't rely on QEMU supplying the -sandbox option
without CONFIG_SECCOMP.
Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
src/qemu/qemu_command.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f3724a766b..755e371caa 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9849,7 +9849,8 @@ qemuBuildSeccompSandboxCommandLine(virCommandPtr cmd,
virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED)
{
if (cfg->seccompSandbox == 0) {
- virCommandAddArgList(cmd, "-sandbox", "off", NULL);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SECCOMP_SANDBOX))
+ virCommandAddArgList(cmd, "-sandbox", "off", NULL);
return 0;
}
--
2.16.1
More information about the libvir-list
mailing list