diff options
author | netblue30 <netblue30@yahoo.com> | 2016-10-29 08:25:47 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-10-29 08:25:47 -0400 |
commit | a4da83cae8c7542d0fa1c2733bcf230754425bbb (patch) | |
tree | 978ccf26d9d30e2c3d95492e96f45834884f4e04 /src/fseccomp/syscall.c | |
parent | compile cleanup (diff) | |
download | firejail-a4da83cae8c7542d0fa1c2733bcf230754425bbb.tar.gz firejail-a4da83cae8c7542d0fa1c2733bcf230754425bbb.tar.zst firejail-a4da83cae8c7542d0fa1c2733bcf230754425bbb.zip |
sbox/fseccomp
Diffstat (limited to 'src/fseccomp/syscall.c')
-rw-r--r-- | src/fseccomp/syscall.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/fseccomp/syscall.c b/src/fseccomp/syscall.c new file mode 100644 index 000000000..c67d45598 --- /dev/null +++ b/src/fseccomp/syscall.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include "fseccomp.h" | ||
2 | #include <sys/syscall.h> | ||
3 | |||
4 | typedef struct { | ||
5 | char *name; | ||
6 | int nr; | ||
7 | } SyscallEntry; | ||
8 | |||
9 | static SyscallEntry syslist[] = { | ||
10 | // | ||
11 | // code generated using tools/extract-syscall | ||
12 | // | ||
13 | #include "../include/syscall.h" | ||
14 | // | ||
15 | // end of generated code | ||
16 | // | ||
17 | }; // end of syslist | ||
18 | |||
19 | void syscall_print(void) { | ||
20 | int i; | ||
21 | int elems = sizeof(syslist) / sizeof(syslist[0]); | ||
22 | for (i = 0; i < elems; i++) { | ||
23 | printf("%d\t- %s\n", syslist[i].nr, syslist[i].name); | ||
24 | } | ||
25 | printf("\n"); | ||
26 | } | ||