Skip to content

Commit

Permalink
Adding seccomp calls to vl.c (v8)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Otubo <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
---
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.
  • Loading branch information
Eduardo Otubo authored and Anthony Liguori committed Aug 16, 2012
1 parent 2f668be commit 452dfbe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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]);

Expand Down

0 comments on commit 452dfbe

Please sign in to comment.