From: Roy Marples Date: Thu, 19 Oct 2023 10:34:30 +0000 (+0100) Subject: privsep: Allow dup2 with SECCOMP X-Git-Tag: v10.0.4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd2e62e72da5079aa8b38f8dac4a0fdeadfecaba;p=thirdparty%2Fdhcpcd.git privsep: Allow dup2 with SECCOMP --- diff --git a/src/privsep-linux.c b/src/privsep-linux.c index b748abcd..1192eb6c 100644 --- a/src/privsep-linux.c +++ b/src/privsep-linux.c @@ -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