exec.clean not working correctly on FreeBSD 12.0-RELEASE-p3?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

exec.clean not working correctly on FreeBSD 12.0-RELEASE-p3?

Philipp Vlassakakis
Hi,

I noticed that exec.clean does not work correctly on FreeBSD 12.0-RELEASE-p3.
Can anyone confirm this?

root@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@server1:~ # jexec testjail
root@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@server1:~ # jexec -l testjail  
root@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?

Regards
Philipp
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: exec.clean not working correctly on FreeBSD 12.0-RELEASE-p3?

James Gritton-2
On 2019-04-03 15:22, [hidden email] wrote:

> Hi,
>
> I noticed that exec.clean does not work correctly on FreeBSD
> 12.0-RELEASE-p3.
> Can anyone confirm this?
>
> root@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@server1:~ # jexec testjail
> root@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@server1:~ # jexec -l testjail
> root@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
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "[hidden email]"