aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-08-30 16:33:48 +0200
committerEduardo Otubo <otubo@redhat.com>2018-09-26 15:07:35 +0200
commit5780760f5ea6163939a5dabe7427318b4f07d1a2 (patch)
tree4977ed2945bec3e1bc0e8ee70ab79147ae5e4697 /vl.c
parent19b599f7664b2ebfd0f405fb79c14dd241557452 (diff)
seccomp: check TSYNC host capability
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 <marcandre.lureau@redhat.com> Signed-off-by: Eduardo Otubo <otubo@redhat.com> Acked-by: Eduardo Otubo <otubo@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
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