aboutsummaryrefslogtreecommitdiff
path: root/src/pseccomp.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-05-22 22:25:31 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-05-22 22:25:31 +0200
commit52a8693b242f6ef1f0c3fa9c7d008728fcfb7f75 (patch)
tree42fe9271ba116280fa70b4f361d35892e8dc779d /src/pseccomp.c
parent45189d750814f369b9b68b6ae3c04605187ba37c (diff)
POTD skeleton #77.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/pseccomp.c')
-rw-r--r--src/pseccomp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pseccomp.c b/src/pseccomp.c
index 7f08ab2..2660e2a 100644
--- a/src/pseccomp.c
+++ b/src/pseccomp.c
@@ -28,7 +28,7 @@ static const int default_allowed_syscalls[] = {
SCMP_SYS(listen), SCMP_SYS(connect), SCMP_SYS(getsockname),
SCMP_SYS(accept), SCMP_SYS(sendto), SCMP_SYS(recvmsg), SCMP_SYS(recvfrom),
SCMP_SYS(epoll_create1), SCMP_SYS(epoll_ctl), SCMP_SYS(epoll_pwait),
- SCMP_SYS(poll),
+ SCMP_SYS(poll), SCMP_SYS(pipe), SCMP_SYS(pipe2),
SCMP_SYS(set_robust_list), SCMP_SYS(getrlimit),
SCMP_SYS(seccomp), SCMP_SYS(getrusage),
SCMP_SYS(prctl), SCMP_SYS(mmap), SCMP_SYS(brk), SCMP_SYS(madvise),
@@ -47,7 +47,8 @@ static const int default_allowed_syscalls[] = {
SCMP_SYS(umount2),
SCMP_SYS(mknod), SCMP_SYS(mkdir), SCMP_SYS(rmdir),
SCMP_SYS(statfs), SCMP_SYS(ioctl),
- SCMP_SYS(chown), SCMP_SYS(chmod), SCMP_SYS(setsid), SCMP_SYS(dup2),
+ SCMP_SYS(chown), SCMP_SYS(chmod), SCMP_SYS(setsid),
+ SCMP_SYS(dup), SCMP_SYS(dup2), SCMP_SYS(dup3),
SCMP_SYS(sethostname), SCMP_SYS(uname), SCMP_SYS(arch_prctl)
};
@@ -67,7 +68,7 @@ static const int jail_allowed_syscalls[] = {
SCMP_SYS(mmap), SCMP_SYS(brk), SCMP_SYS(madvise),
SCMP_SYS(mprotect), SCMP_SYS(munmap), SCMP_SYS(futex),
SCMP_SYS(open), SCMP_SYS(openat), SCMP_SYS(fstat), SCMP_SYS(access),
- SCMP_SYS(poll),
+ SCMP_SYS(poll), SCMP_SYS(pipe), SCMP_SYS(pipe2),
SCMP_SYS(lseek), SCMP_SYS(stat), SCMP_SYS(readlink), SCMP_SYS(getcwd),
SCMP_SYS(lstat), SCMP_SYS(sysinfo),
SCMP_SYS(setuid), SCMP_SYS(setgid),
@@ -78,6 +79,7 @@ static const int jail_allowed_syscalls[] = {
SCMP_SYS(chdir), SCMP_SYS(mount),
SCMP_SYS(umount2),
SCMP_SYS(ioctl),
+ SCMP_SYS(dup), SCMP_SYS(dup2), SCMP_SYS(dup3),
SCMP_SYS(sethostname), SCMP_SYS(uname), SCMP_SYS(arch_prctl)
};