dhcpcd-discuss

Re: Specify chrootdir independent of privsep_user's homedir

Ben Woods

Mon May 04 15:50:56 2020

On Fri, 1 May 2020 at 04:28, Roy Marples <roy@xxxxxxxxxxxx> wrote:

> Hi Ben
>
> On 27/04/2020 07:09, Ben Woods wrote:
> > I think it would be a nice feature to allow the chrootdir to be
> specified
> > independently from the privsep_user's home directory.
>
> Anyway, I've added the option here regardless:
>
> https://roy.marples.name/cgit/dhcpcd.git/commit/?id=949d0f9aee6aefa461c949262202af12fa8143cf
>
> If it doesn't begin with / or is /var/empty then chroot is refused.
>
> Build time configurable for it here:
>
> https://roy.marples.name/cgit/dhcpcd.git/commit/?id=dc855cfb9870b2ce078f54ff5fe08deff1233a1f
>


Hi Roy,

Just letting you know that I have now tested this, and it looks to be
working well.

I now have dhcpcd from the recent commit edec47c on 2020-05-01 running as
the _dhcp user on FreeBSD using the chrootdir /var/chroot/dhcpcd.

Thanks very much for adding this.

This only potential tiny improvement (and I am not sure if this is the
right behaviour or not) could be to print the value of the CHROOTDIR
variable at the end of the configure phase so that it appears in the list
below? This could help people troubleshooting in the future?

   SYSCONFDIR =		/usr/local/etc
   SBINDIR =		/usr/local/sbin
   LIBDIR =		/usr/local/lib
   LIBEXECDIR =		/usr/local/libexec
   DBDIR =		/var/db/dhcpcd
   RUNDIR =		/var/run/dhcpcd
   MANDIR =		/usr/local/man
   DATADIR =		/usr/local/share/examples
   HOOKSCRIPTS =	50-ntp.conf
   EGHOOKSCRIPTS =	50-ypbind
   STATUSARG = 		onestatus
   PRIVSEPUSER =	_dhcp


Regards,
Ben

Follow-Ups:
Re: Specify chrootdir independent of privsep_user's homedirRoy Marples
References:
Specify chrootdir independent of privsep_user's homedirBen Woods
Re: Specify chrootdir independent of privsep_user's homedirRoy Marples
Archive administrator: postmaster@marples.name