From 5780760f5ea6163939a5dabe7427318b4f07d1a2 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 30 Aug 2018 16:33:48 +0200 Subject: seccomp: check TSYNC host capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove -sandbox option if the host is not capable of TSYNC, since the sandbox will fail at setup time otherwise. This will help libvirt, for ex, to figure out if -sandbox will work. Signed-off-by: Marc-André Lureau Signed-off-by: Eduardo Otubo Acked-by: Eduardo Otubo --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 5ba06adf78..380ae7ba2b 100644 --- a/vl.c +++ b/vl.c @@ -4007,8 +4007,8 @@ int main(int argc, char **argv, char **envp) } #ifdef CONFIG_SECCOMP - if (qemu_opts_foreach(qemu_find_opts("sandbox"), - parse_sandbox, NULL, NULL)) { + olist = qemu_find_opts_err("sandbox", NULL); + if (olist && qemu_opts_foreach(olist, parse_sandbox, NULL, NULL)) { exit(1); } #endif -- cgit v1.2.3