svn commit: r368682 - stable/12/sbin/bectl
Kyle Evans
kevans at FreeBSD.org
Tue Dec 15 21:53:55 UTC 2020
Author: kevans
Date: Tue Dec 15 21:53:54 2020
New Revision: 368682
URL: https://svnweb.freebsd.org/changeset/base/368682
Log:
MFC r368388: bectl: simplify the tail end of the jail cmd
This has already confused me once (and I'm pretty sure I wrote it), so let's
clarify: unjailing after the command has completed will only happen if we're
interactive and -U has not been specified.
This just folds two conditionals together to make it obvious how -b/-U
interact with each other.
Modified:
stable/12/sbin/bectl/bectl_jail.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sbin/bectl/bectl_jail.c
==============================================================================
--- stable/12/sbin/bectl/bectl_jail.c Tue Dec 15 21:53:15 2020 (r368681)
+++ stable/12/sbin/bectl/bectl_jail.c Tue Dec 15 21:53:54 2020 (r368682)
@@ -356,10 +356,8 @@ bectl_cmd_jail(int argc, char *argv[])
}
free(jargv);
- if (!interactive)
- return (0);
-
- if (unjail) {
+ /* Non-interactive (-b) mode means the jail sticks around. */
+ if (interactive && unjail) {
/*
* We're not checking the jail id result here because in the
* case of invalid param, or last command in jail was an error
More information about the svn-src-all
mailing list