Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2012 01:21:06 GMT
From:      Glen Barber <gjb@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/165515: [jail][patch] "jail: unknown parameter: allow.nomount" when starting jail
Message-ID:  <201202280121.q1S1L6Sr047797@red.freebsd.org>
Resent-Message-ID: <201202280130.q1S1U7c3001678@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202280121.q1S1L6Sr047797>