bin/165515: [jail][patch] "jail: unknown parameter: allow.nomount" when starting jail

Glen Barber gjb at FreeBSD.org
Tue Feb 28 01:30:07 UTC 2012


>Number:         165515
>Category:       bin
>Synopsis:       [jail][patch] "jail: unknown parameter: allow.nomount" when starting jail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 28 01:30:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Glen Barber
>Release:        10.0-CURRENT r232116M
>Organization:
>Environment:
FreeBSD nucleus 10.0-CURRENT FreeBSD 10.0-CURRENT #7 r232116M: Sun Feb 26 14:12:14 EST 2012     root at nucleus:/usr/obj/usr/src/sys/NUCLEUS  amd64
>Description:
On a recent -CURRENT, the jail(8) rc script fails to start jails.  This seems to be caused by looking up a sysctl that does not exist.
>How-To-Repeat:
Create a minimalistic jail setup as follows:

 nucleus# cat /etc/rc.conf.local 
 #
 jail_enable="YES"
 jail_parallel_start="YES"
 jail_list="cfm"
 jail_cfm_hostname="cfm"
 jail_cfm_rootdir="/jails/cfm"
 jail_cfm_ip="172.16.1.2"

Start the jail with the rc(8) script:

 nucleus# sh -x /etc/rc.d/jail start cfm
 + . /etc/rc.subr
 [...]
 + eval '_x="$jail_cfm_ip_multi0"'
 + _x=''
 + break
 + echo ' cannot start jail "cfm": '
  cannot start jail "cfm": 
 + tail +2 /tmp/jail.bJIDqW5x/jail.52395
 jail: unknown parameter: allow.nomount

>Fix:
The attached patch fixes it for me.


Patch attached with submission follows:

Index: usr.sbin/jail/jail.c
===================================================================
--- usr.sbin/jail/jail.c	(revision 232116)
+++ usr.sbin/jail/jail.c	(working copy)
@@ -84,7 +84,7 @@
 	{ "security.jail.chflags_allowed",
 	  "allow.nochflags", "allow.chflags" },
 	{ "security.jail.mount_allowed",
-	  "allow.nomount", "allow.mount" },
+	  "allow.mount", "allow.nomount" },
 	{ "security.jail.socket_unixiproute_only",
 	  "allow.socket_af", "allow.nosocket_af" },
 };


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list