exec.clean not working correctly on FreeBSD 12.0-RELEASE-p3?
James Gritton
jamie at freebsd.org
Thu Apr 4 16:17:42 UTC 2019
On 2019-04-03 15:22, freebsd-en at lists.vlassakakis.de wrote:
> Hi,
>
> I noticed that exec.clean does not work correctly on FreeBSD
> 12.0-RELEASE-p3.
> Can anyone confirm this?
>
> root at server1:~ # freebsd-version -kru
> 12.0-RELEASE-p3
> 12.0-RELEASE-p3
> 12.0-RELEASE-p3
>
>
> /etc/jail.conf:
> [...]
> Some VNET-Stuff and other options
> [...]
> exec.clean;
>
> testjail {
> host.hostname = "testjail.XXX.XXX.XXX";
> path =
> "/jails/0536b986-5643-11e9-81db-4ccc6a0aa478/base/";
> $epair = "epair0";
> }
>
>
> If i use "exec.clean" inside my Jail-Definition, it doesn't work
> either.
>
> /etc/jail.conf:
> [...]
> Some VNET-Stuff and other options
> [...]
>
> testjail {
> host.hostname = "testjail.XXX.XXX.XXX";
> path =
> "/jails/0536b986-5643-11e9-81db-4ccc6a0aa478/base/";
> $epair = "epair0";
> exec.clean;
> }
>
> root at server1:~ # jexec testjail
> root at testjail:/ # printenv
> USER=root
> LOGNAME=root
> HOME=/root
> MAIL=/var/mail/root
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
> TERM=xterm-256color
> BLOCKSIZE=K
> SHELL=/bin/csh
> SSH_CLIENT=80.XXX.XXX.XXX 62416 40443
> SSH_CONNECTION=80.XXX.XXX.XXX 62416 194.XXX.XXX.XXX 40443
> SSH_TTY=/dev/pts/0
> HOSTTYPE=FreeBSD
> VENDOR=amd
> OSTYPE=FreeBSD
> MACHTYPE=x86_64
> SHLVL=2
> PWD=/
> GROUP=wheel
> HOST=testjail.XXX.XXX.XXX
> REMOTEHOST=XXXXXXXXX
> EDITOR=vim
> PAGER=less
>
>
> -----------------
>
> If i use "jexec -l", it works fine.
>
> root at server1:~ # jexec -l testjail
> root at testjail:~ # printenv
> SHELL=/bin/csh
> HOME=/root
> USER=root
> BLOCKSIZE=K
> MAIL=/var/mail/root
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
> TERM=xterm-256color
> HOSTTYPE=FreeBSD
> VENDOR=amd
> OSTYPE=FreeBSD
> MACHTYPE=x86_64
> SHLVL=1
> PWD=/root
> LOGNAME=root
> GROUP=wheel
> HOST=testjail.XXX.XXX.XXX
> EDITOR=vim
> PAGER=less
>
>
> Any suggestions?
This isn't a problem in exec.clean per se, but in jexec(8). Nothing in
the jail.conf file is even peeked at by jexec, which communicates only
with the kernel. So the "-l" is necessary to get the same effect that
exec.clean gives on jail creation.
- Jamie
More information about the freebsd-jail
mailing list