diff options
Diffstat (limited to 'frida_mode/src/seccomp/seccomp.c')
-rw-r--r-- | frida_mode/src/seccomp/seccomp.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/frida_mode/src/seccomp/seccomp.c b/frida_mode/src/seccomp/seccomp.c new file mode 100644 index 00000000..99111591 --- /dev/null +++ b/frida_mode/src/seccomp/seccomp.c @@ -0,0 +1,41 @@ +#include "frida-gumjs.h" + +#include "debug.h" + +#include "seccomp.h" +#include "util.h" + +char *seccomp_filename = NULL; + +void seccomp_on_fork(void) { + + if (seccomp_filename == NULL) { return; } + +#ifdef __APPLE__ + FATAL("Seccomp not supported on OSX"); +#else + seccomp_callback_parent(); +#endif + +} + +void seccomp_config(void) { + + seccomp_filename = getenv("AFL_FRIDA_SECCOMP_FILE"); + +} + +void seccomp_init(void) { + + OKF("Seccomp - file [%s]", seccomp_filename); + + if (seccomp_filename == NULL) { return; } + +#ifdef __APPLE__ + FATAL("Seccomp not supported on OSX"); +#else + seccomp_callback_initialize(); +#endif + +} + |