]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: Allow ioctl TCGETS
authorMatthew Clarkson <mclarkson@reliablecontrols.com>
Thu, 19 Nov 2020 15:37:33 +0000 (15:37 +0000)
committerRoy Marples <roy@marples.name>
Thu, 19 Nov 2020 15:37:33 +0000 (15:37 +0000)
printf on some platforms seems to require it.
Without this, script_dump() may fault.

src/privsep-linux.c

index ed391e7d5b7720a0e33b3ae9c53cf6578fc75620..306eb2498993d65fb6a471fdb5aa30fea236aa98 100644 (file)
@@ -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