want to have working IPv6 temporary addresses.
SLAAC private addresses are just as private, just stable.
+Linux SECCOMP is very dependant on libc vs kernel.
+When libc is changed and uses a syscall that dhcpcd is unaware of,
+SECCOMP may break dhcpcd.
+When this happens you can configure dhcpcd with --disable-seccomp
+so dhcpcd can use a POSIX resource limited sandbox with privilege separation
+still. If you do this, please report the issue so that we can adjust the
+SECCOMP filter so that dhcpcd can use SECCOMP once more.
+Or convince the libc/kernel people to adpot something more maintainable
+like FreeBSD's capsicum or OpenBSD's pledge.
+
## Init systems
We try and detect how dhcpcd should interact with system services at runtime.
If we cannot auto-detect how do to this, or it is wrong then
INET6=
PRIVSEP=
PRIVSEP_USER=
+SECCOMP=
ARC4RANDOM=
CLOSEFROM=
RBTREE=
--enable-auth) AUTH=yes;;
--disable-privsep) PRIVSEP=no;;
--enable-privsep) PRIVSEP=yes;;
+ --disable-seccomp) SECCOMP=no;;
+ --enable-seccomp) SECCOMP=yes;;
--privsepuser) PRIVSEP_USER=$var;;
--prefix) PREFIX=$var;prefix=$var;; # prefix is set for autotools compat
--sysconfdir) SYSCONFDIR=$var;;
echo "PRIVSEP_SRCS+= privsep-bpf.c" >>$CONFIG_MK
fi
case "$OS" in
- linux*) echo "PRIVSEP_SRCS+= privsep-linux.c" >>$CONFIG_MK;;
+ linux*)
+ echo "PRIVSEP_SRCS+= privsep-linux.c" >>$CONFIG_MK
+ if [ -n "$SECCOMP" ] && [ "$SECCOMP" != no ]; then
+ echo "#define DISABLE_SECCOMP" >>$CONFIG_H
+ fi
+ ;;
solaris*|sunos*) echo "PRIVSEP_SRCS+= privsep-sun.c" >>$CONFIG_MK;;
*) echo "PRIVSEP_SRCS+= privsep-bsd.c" >>$CONFIG_MK;;
esac
return ps_root_readerror(ctx, NULL, 0);
}
+#ifdef DISABLE_SECCOMP
+#warning SECCOMP has been disabled
+#else
+
#if (BYTE_ORDER == LITTLE_ENDIAN)
# define SECCOMP_ARG_LO 0
# define SECCOMP_ARG_HI sizeof(uint32_t)
}
return 0;
}
+#endif /* !DISABLE_SECCOMP */
#define PS_ROOT_FD(ctx) ((ctx)->ps_root ? (ctx)->ps_root->psp_fd : -1)
-#ifdef __linux__
+#if !defined(DISABLE_SECCOMP) && defined(__linux__)
# include <linux/version.h>
# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
# define HAVE_SECCOMP