manpage says for -j: > -j jail Operate on the given jail specified by jid or name. (The > version of the installed userland is detected and the > --currently-running option is no more required.) So I would assume that all file/dir related operations: -b, -d, -f, -k are rebased on top of the basedir of the jail, but this does not happen. Only -b is set. Issues: * Bug 235318, Bug 253989: host's workdir is shredded * -f is used from the host, resulting in different conf applied, all paths from that conffile need to be rebase on top of basedir * -k since -f is not rebased the wrong key might be used. Expectatation is that all operations runs fully isolated from the host, namely jailed. Even if a jail isn't used -b should describe where and how it is applied...
This issue is visibible when using Bastille-managed jails: * https://github.com/BastilleBSD/bastille/blob/master/usr/local/share/bastille/upgrade.sh * https://github.com/BastilleBSD/bastille/blob/master/usr/local/share/bastille/update.sh I will create an issue there...for the time being.
Reported downstream.