mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
Adding seccomp calls to vl.c (v8)
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1: - Full seccomp calls and data included in vl.c v1 -> v2: - Full seccomp calls and data removed from vl.c and put into separate qemu-seccomp.[ch] file.
This commit is contained in:
parent
2f668be775
commit
452dfbef60
1 changed files with 13 additions and 0 deletions
13
vl.c
13
vl.c
|
@ -63,6 +63,11 @@
|
|||
#include <linux/ppdev.h>
|
||||
#include <linux/parport.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SECCOMP
|
||||
#include "qemu-seccomp.h"
|
||||
#endif
|
||||
|
||||
#ifdef __sun__
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ethernet.h>
|
||||
|
@ -2344,6 +2349,14 @@ int main(int argc, char **argv, char **envp)
|
|||
const char *trace_events = NULL;
|
||||
const char *trace_file = NULL;
|
||||
|
||||
#ifdef CONFIG_SECCOMP
|
||||
if (seccomp_start() < 0) {
|
||||
fprintf(stderr,
|
||||
"seccomp: failed to install syscall filter in the kernel\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
atexit(qemu_run_exit_notifiers);
|
||||
error_set_progname(argv[0]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue