diff options
| author | Roy Marples <roy@marples.name> | 2020-04-30 21:26:16 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-04-30 21:26:16 +0100 |
| commit | c72190790162cf2afe51feacf76be4154b215d3d (patch) | |
| tree | c5c6691fccbf1fe59ed501e7feccfef9040f3529 /configure | |
| parent | cc2d257183f1a70c013a451d6b16cd061e6e5975 (diff) | |
| download | dhcpcd-c72190790162cf2afe51feacf76be4154b215d3d.tar.xz | |
privsep: allow --chrootdir= to configure a default chroot directory
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -13,6 +13,7 @@ IPV4LL= INET6= PRIVSEP= PRIVSEP_USER= +PRIVSEP_CHROOT= ARC4RANDOM= CLOSEFROM= RBTREE= @@ -71,6 +72,7 @@ for x do --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;; @@ -579,9 +581,17 @@ if [ "$PRIVSEP" = yes ]; then 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 |
