From nobody@FreeBSD.org  Tue May 24 08:19:33 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5557416A41C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 May 2005 08:19:33 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 30A6143D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 May 2005 08:19:33 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j4O8JWow084288
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 May 2005 08:19:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j4O8JW5q084287;
	Tue, 24 May 2005 08:19:32 GMT
	(envelope-from nobody)
Message-Id: <200505240819.j4O8JW5q084287@www.freebsd.org>
Date: Tue, 24 May 2005 08:19:32 GMT
From: Mark A Bernadiner <mark@zlatoust.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] Error in /etc/rc.subr: jail+devfs.rules does not work
X-Send-Pr-Version: www-2.3

>Number:         81429
>Category:       conf
>Synopsis:       [patch] Error in /etc/rc.subr: jail+devfs.rules does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    matteo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 24 08:20:02 GMT 2005
>Closed-Date:    Mon Jan 23 20:07:01 GMT 2006
>Last-Modified:  Mon Jan 23 20:07:01 GMT 2006
>Originator:     Mark A Bernadiner
>Release:        5.4-RELEASE
>Organization:
ZMZ
>Environment:
FreeBSD my.zmz.chel.su 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May  8 10:21:06 UTC 2005     root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
  
>Description:
Error in /etc/rc.subr: devfs.rules in jail does not work     
>How-To-Repeat:
cat <<! >> /etc/defaults/devfs.rules 
#
[devfsrules_unhide_basic5=5]
add path null unhide
add path zero unhide
add path crypto unhide
add path random unhide
add path urandom unhide
add path 'ttyv0' unhide
add path 'ttyv1' unhide
add path 'ttyv2' unhide
add path 'ttyv3' unhide
add path 'ttyv4' unhide
add path 'ttyv5' unhide
add path 'ttyv6' unhide
add path 'ttyv7' unhide
add path 'ttyv8' unhide
add path '*sa*' unhide

#
[devfsrules_jail=6]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic5
add include $devfsrules_unhide_login
! 
cat <<! >> /etc/rc.conf
jail_enable="YES"
jail_list="my"
jail_set_hostname_allow="NO"
#
jail_my_rootdir="/my/root"
jail_my_hostname="my.zmz.chel.su"
jail_my_ip="10.1.1.11"
jail_my_exec="/bin/sh /etc/rc"
jail_my_devfs_enable="YES"
jail_my_devfs_ruleset="6"
#
!
reboot
#... in jail:
#ls -l /dev
# ???? 8-(
>Fix:
# diff /etc/rc.subr /etc/rc.subr.ORIG
42,43d41
< #  My_patch_0001  Mark A Bernadiner mark@zlatoust.ru 24.05.2005
<
1197c1195
<       [ -n "$1" ] && eval rs=\$1 || rs=
---
>       [ -n "$1" ] && eval rs=\$$1 || rs=
1222c1220
<       [ -n "$1" ] && eval rs=\$1 || rs=
---
>       [ -n "$1" ] && eval rs=\$$1 || rs=
     
>Release-Note:
>Audit-Trail:

From: Anish Mistry <mistry.7@osu.edu>
To: bug-followup@FreeBSD.org, mark@zlatoust.ru
Cc:  
Subject: Re: bin/81429: %5Bpatch%5D Error in %2Fetc%2Frc.subrA jail+devfs.rules does not work
Date: Sat, 16 Jul 2005 12:43:32 -0400

 --nextPart1843310.qXjzxViZUO
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 This doesn't seem to actually be in 5.4 according to the cvsweb.  Did=20
 you forget to mergemaster?
 
 =2D-=20
 Anish Mistry
 
 --nextPart1843310.qXjzxViZUO
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.1 (FreeBSD)
 
 iD8DBQBC2Tk/xqA5ziudZT0RAoCaAKCaP/abxhP9nfELgCOuUNfDxX9ztwCfYD+r
 6t64RBvthpLGJsUBq8We8u0=
 =maNW
 -----END PGP SIGNATURE-----
 
 --nextPart1843310.qXjzxViZUO--
State-Changed-From-To: open->closed 
State-Changed-By: matteo 
State-Changed-When: Mon Jan 23 20:06:17 UTC 2006 
State-Changed-Why:  
This was fixed long ago both in current, in releng_6 and in releng_5 


Responsible-Changed-From-To: freebsd-bugs->matteo 
Responsible-Changed-By: matteo 
Responsible-Changed-When: Mon Jan 23 20:06:17 UTC 2006 
Responsible-Changed-Why:  
Take this just in case.. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81429 
>Unformatted:
