Skip to content

Commit

Permalink
privsep: Allow dup3 on Linux
Browse files Browse the repository at this point in the history
It seems some libc will really call dup3 rather than dup2.
Another fix for #260.
  • Loading branch information
rsmarples committed Nov 10, 2023
1 parent 1064814 commit 4bb0c8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/privsep-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4bb0c8f

Please sign in to comment.