blob: 12b58f4ed3fe33fb89bda8934f2951ab39fc99ab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#include "frida-gumjs.h"
#include "seccomp.h"
#include "util.h"
char *seccomp_filename = NULL;
void seccomp_on_fork(void) {
if (seccomp_filename == NULL) { return; }
#ifdef __APPLE__
FFATAL("Seccomp not supported on OSX");
#elif defined(__ANDROID__)
FFATAL("Seccomp not supported on Android");
#else
seccomp_callback_parent();
#endif
}
void seccomp_config(void) {
seccomp_filename = getenv("AFL_FRIDA_SECCOMP_FILE");
}
void seccomp_init(void) {
FOKF(cBLU "Seccomp" cRST " - " cGRN "file:" cYEL " [%s]",
seccomp_filename == NULL ? " " : seccomp_filename);
if (seccomp_filename == NULL) { return; }
#ifdef __APPLE__
FFATAL("Seccomp not supported on OSX");
#elif defined(__ANDROID__)
FFATAL("Seccomp not supported on Android");
#else
seccomp_callback_initialize();
#endif
}
|