sandbox: disable -sandbox if CONFIG_SECCOMP undefined
If CONFIG_SECCOMP is undefined, the option 'elevateprivileges' remains compiled. This would make libvirt set the corresponding capability and then trigger failure during guest startup. This patch moves the code regarding seccomp command line options to qemu-seccomp.c file and wraps qemu_opts_foreach finding sandbox option with CONFIG_SECCOMP. Because parse_sandbox() is moved into qemu-seccomp.c file, change seccomp_start() to static function. Signed-off-by: NYi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Tested-by: NJán Tomko <jtomko@redhat.com> Acked-by: NEduardo Otubo <otubo@redhat.com> Message-Id: <20180531032937.1925-1-zyimin@linux.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Showing
想要评论请 注册 或 登录