summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-11-28 16:41:15 +0000
committerRoy Marples <roy@marples.name>2019-11-28 16:41:15 +0000
commit6502584888c432a468d8918ce04e202281cb8ef9 (patch)
treeb62b1e3a7ba544c9e842e6f595b25fdaab8059b4 /configure
parenta7613391cbd1f33867446a981c6ec648d3e35278 (diff)
downloaddhcpcd-6502584888c432a468d8918ce04e202281cb8ef9.tar.xz
privsep: Add support for priviledge separation
Not enabled by default - enable with ./configure --enable-privsep Requires a user added to the system - default _dhcpcd Several processes will be spawned off the main state engine: a privileged actioneer and a generic network proxy. Only the privileged actioneer process will retain root permissions. When required, the privileged actioneer will also spawn BPF listeners for BOOTP (DHCP) and ARP. The BOOTP BPF listener should be a short lived process. On kernels with RFC 5227 support, the ARP BPF listener will only be used for ARPing and announcing a preferred address and will also be a short lived process. When not running in master mode, an address listener will be spawned for each address (with the exception of RA dervived addresses) dhcpcd cares about. TODO: * Solaris support. * ARP BPF address filtering.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index 99dc05f7..9cea44b4 100755
--- a/configure
+++ b/configure
@@ -11,6 +11,7 @@ ARP=
ARPING=
IPV4LL=
INET6=
+PRIVSEP=
ARC4RANDOM=
CLOSEFROM=
RBTREE=
@@ -65,6 +66,8 @@ for x do
--enable-embedded) EMBEDDED=yes;;
--disable-auth) AUTH=no;;
--enable-auth) AUTH=yes;;
+ --disable-privsep) PRIVSEP=no;;
+ --enable-privsep) PRIVSEP=yes;;
--prefix) PREFIX=$var;;
--sysconfdir) SYSCONFDIR=$var;;
--bindir|--sbindir) SBINDIR=$var;;
@@ -524,6 +527,22 @@ if [ -z "$AUTH" -o "$AUTH" = yes ]; then
echo "SRCS+= auth.c" >>$CONFIG_MK
fi
+if [ "$PRIVSEP" = yes ]; then
+ echo "Enabling Priviledge Separation"
+ echo "WARNING: This is an experimental feature"
+ echo "CPPFLAGS+= -DPRIVSEP" >>$CONFIG_MK
+ echo "DHCPCD_SRCS+= privsep.c privsep-root.c privsep-inet.c" \
+ >>$CONFIG_MK
+ if [ -z "$INET" ] || [ "$INET" = yes ]; then
+ echo "DHCPCD_SRCS+= privsep-bpf.c" >>$CONFIG_MK
+ fi
+ case "$OS" in
+ linux*) echo "DHCPCD_SRCS+= privsep-linux.c" >>$CONFIG_MK;;
+ solaris*|sunos*) echo "DHCPCD_SRCS+= privsep-sun.c" >>$CONFIG_MK;;
+ *) echo "DHCPCD_SRCS+= privsep-bsd.c" >>$CONFIG_MK;;
+ esac
+fi
+
echo "Using compiler .. $CC"
# Add CPPFLAGS and CFLAGS to CC for testing features
XCC="$CC `$SED -n -e 's/CPPFLAGS+=*\(.*\)/\1/p' $CONFIG_MK`"