summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Clarkson <mclarkson@reliablecontrols.com>2020-11-19 15:37:33 +0000
committerRoy Marples <roy@marples.name>2020-11-19 15:37:33 +0000
commit3a32f22b03b30961ee922ff864ee525fb75fd488 (patch)
tree12a44a21ce72019de1549504ea7b174f319a2dc3
parent12a91777bd8126056518c8cc9edeb933f451afa8 (diff)
downloaddhcpcd-3a32f22b03b30961ee922ff864ee525fb75fd488.tar.xz
privsep: Allow ioctl TCGETS
printf on some platforms seems to require it. Without this, script_dump() may fault.
-rw-r--r--src/privsep-linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/privsep-linux.c b/src/privsep-linux.c
index ed391e7d..306eb249 100644
--- a/src/privsep-linux.c
+++ b/src/privsep-linux.c
@@ -257,6 +257,8 @@ static struct sock_filter ps_seccomp_filter[] = {
SECCOMP_ALLOW_ARG(__NR_ioctl, 1, SIOCGIFINDEX),
SECCOMP_ALLOW_ARG(__NR_ioctl, 1, SIOCGIFMTU),
SECCOMP_ALLOW_ARG(__NR_ioctl, 1, SIOCGIFVLAN),
+ /* printf on some platforms seems to use this ioctl */
+ SECCOMP_ALLOW_ARG(__NR_ioctl, 1, TCGETS),
/* SECCOMP BPF is newer than nl80211 so we don't need SIOCGIWESSID
* which lives in the impossible to include linux/wireless.h header */
#endif