Author: kevans Date: Mon Jun 10 14:35:04 2019 New Revision: 348862 URL: https://svnweb.freebsd.org/changeset/base/348862
Log: MFC r348510: bectl(8): Don't accept jid=0 from jail_getid This will trivially exist, but we don't want it - none of our jailed BEs will have jid=0. 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 Mon Jun 10 14:31:18 2019 (r348861) +++ stable/12/sbin/bectl/bectl_jail.c Mon Jun 10 14:35:04 2019 (r348862) @@ -410,7 +410,12 @@ bectl_locate_jail(const char *ident) /* Try the easy-match first */ jid = jail_getid(ident); - if (jid != -1) + /* + * jail_getid(0) will always return 0, because this prison does exist. + * bectl(8) knows that this is not what it wants, so we should fall + * back to mount point search. + */ + if (jid > 0) return (jid); /* Attempt to try it as a BE name, first */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"