]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Allow dup2 with SECCOMP
authorRoy Marples <roy@marples.name>
Thu, 19 Oct 2023 10:34:30 +0000 (11:34 +0100)
committerRoy Marples <roy@marples.name>
Thu, 19 Oct 2023 10:34:30 +0000 (11:34 +0100)
src/privsep-linux.c

index b748abcdd5f96fb0ec563f96d09bcb33eb895741..1192eb6c23fba5b5c16c4448dcd82f3ae667d29c 100644 (file)
@@ -310,6 +310,9 @@ static struct sock_filter ps_seccomp_filter[] = {
 #ifdef __NR_close
        SECCOMP_ALLOW(__NR_close),
 #endif
+#ifdef __NR_dup2
+       SECCOMP_ALLOW(__NR_dup2), // daemonising dups stderr to stdin(/dev/null)
+#endif
 #ifdef __NR_epoll_ctl
        SECCOMP_ALLOW(__NR_epoll_ctl),
 #endif