From 142938f5c227997c395695fd9e353f1b293a4d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 24 Sep 2021 16:04:30 +0200 Subject: [PATCH] qemu: always assume QEMU_CAPS_SECCOMP_BLACKLIST MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit elevateprivileges was introduced by QEMU commit: 73a1e64725 "seccomp: add elevateprivileges argument to command line" released in 2.11.0 and later made conditional on SECCOMP support by: 9d0fdecbad sandbox: disable -sandbox if CONFIG_SECCOMP undefined Use the existence of the sandbox option as a witness for its support. Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b60ee1192b..fa9998a191 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -10120,7 +10120,7 @@ qemuBuildSeccompSandboxCommandLine(virCommand *cmd, } /* Use blacklist by default if supported */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SECCOMP_BLACKLIST)) { + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SECCOMP_SANDBOX)) { virCommandAddArgList(cmd, "-sandbox", "on,obsolete=deny,elevateprivileges=deny," "spawn=deny,resourcecontrol=deny",