From: Oleg Lyovin Date: Thu, 12 Oct 2023 16:47:05 +0000 (+0300) Subject: privsep: allow __NR_mmap2 syscall (#253) X-Git-Tag: v10.0.4~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ada94b8561f3e96fdd84d445a2dcbed7c8c9a5f;p=thirdparty%2Fdhcpcd.git privsep: allow __NR_mmap2 syscall (#253) The issue occured while compiled by musl toolchain: mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = ? +++ killed by SIGSYS +++ This patchs allows seccomp to make __NR_mmap2 syscall. Signed-off-by: Oleg Lyovin --- diff --git a/src/privsep-linux.c b/src/privsep-linux.c index 67ed0d73..6201b207 100644 --- a/src/privsep-linux.c +++ b/src/privsep-linux.c @@ -364,6 +364,9 @@ static struct sock_filter ps_seccomp_filter[] = { #ifdef __NR_mmap SECCOMP_ALLOW(__NR_mmap), #endif +#ifdef __NR_mmap2 + SECCOMP_ALLOW(__NR_mmap2), +#endif #ifdef __NR_munmap SECCOMP_ALLOW(__NR_munmap), #endif