INET6=
PRIVSEP=
PRIVSEP_USER=
+PRIVSEP_CHROOT=
ARC4RANDOM=
CLOSEFROM=
RBTREE=
--disable-privsep) PRIVSEP=no;;
--enable-privsep) PRIVSEP=yes;;
--privsepuser) PRIVSEP_USER=$var;;
+ --chrootdir) PRIVSEP_CHROOT=$var;;
--prefix) PREFIX=$var;;
--sysconfdir) SYSCONFDIR=$var;;
--bindir|--sbindir) SBINDIR=$var;;
echo "CPPFLAGS+= -DPRIVSEP" >>$CONFIG_MK
echo "PRIVSEP_USER?= $PRIVSEP_USER" >>$CONFIG_MK
+ if [ -n "$PRIVSEP_CHROOT" ]; then
+ echo "PRIVSEP_CHROOT= $PRIVSEP_CHROOT" >>$CONFIG_MK
+ fi
echo "#ifndef PRIVSEP_USER" >>$CONFIG_H
echo "#define PRIVSEP_USER \"$PRIVSEP_USER\"" >>$CONFIG_H
echo "#endif" >>$CONFIG_H
+ if [ -n "$PRIVSEP_CHROOT" ]; then
+ echo "#ifndef PRIVSEP_CHROOT" >>$CONFIG_H
+ echo "#define PRIVSEP_CHROOT \"$PRIVSEP_CHROOT\"" >>$CONFIG_H
+ echo "#endif" >>$CONFIG_H
+ fi
echo "DHCPCD_SRCS+= privsep.c privsep-root.c privsep-inet.c" \
>>$CONFIG_MK
if [ -z "$INET" ] || [ "$INET" = yes ]; then
#endif
#ifdef PRIVSEP
ctx.ps_root_fd = ctx.ps_data_fd = -1;
+#ifdef PRIVSEP_CHROOT
+ ctx.ps_chroot = PRIVSEP_CHROOT;
+#endif
TAILQ_INIT(&ctx.ps_processes);
#endif
rt_init(&ctx);