svn commit: r348863 - stable/11/sbin/bectl
Kyle Evans
kevans at FreeBSD.org
Mon Jun 10 14:47:57 UTC 2019
Author: kevans
Date: Mon Jun 10 14:47:56 2019
New Revision: 348863
URL: https://svnweb.freebsd.org/changeset/base/348863
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.
Approved by: re (gjb)
Modified:
stable/11/sbin/bectl/bectl_jail.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sbin/bectl/bectl_jail.c
==============================================================================
--- stable/11/sbin/bectl/bectl_jail.c Mon Jun 10 14:35:04 2019 (r348862)
+++ stable/11/sbin/bectl/bectl_jail.c Mon Jun 10 14:47:56 2019 (r348863)
@@ -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 */
More information about the svn-src-all
mailing list