]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Allow dup3 on Linux
authorRoy Marples <roy@marples.name>
Thu, 9 Nov 2023 09:21:20 +0000 (09:21 +0000)
committerRoy Marples <roy@marples.name>
Fri, 10 Nov 2023 11:04:22 +0000 (11:04 +0000)
It seems some libc will really call dup3 rather than dup2.
Another fix for #260.

src/privsep-linux.c

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