conf/92636: /usr/local/etc/rc.d scripts with dependencies don't run inside jail

Bruce Becker hostmaster at whois.gts.net
Tue Jan 31 11:30:06 PST 2006


>Number:         92636
>Category:       conf
>Synopsis:       /usr/local/etc/rc.d scripts with dependencies don't run inside jail
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 31 19:30:04 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Bruce Becker
>Release:        6.0
>Organization:
G.T.S.
>Environment:
FreeBSD tarantula.web.ca 6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 22 23:25:49 EST 2006     root at tarantula:/usr/obj/usr/src/sys/TARANTULA  amd64

>Description:
conf files with dependencies such as "# BEFORE: LOGIN" don't get run from /usr/local/etc/rc.d/
>How-To-Repeat:
create conf file /usr/local/etc/rc.d/test in the jail -


#!/bin/sh

# BEFORE: LOGIN
# PROVIDE: test

echo "`date` - test" >/tmp/testit


check to see if it gets run at jail startup


>Fix:
this isn't elegant, but it works -


--- mountcritlocal.orig Thu Jan 26 14:05:17 2006
+++ mountcritlocal      Tue Jan 31 14:05:00 2006
@@ -6,7 +6,8 @@
 
 # PROVIDE: mountcritlocal
 # REQUIRE: root
-# KEYWORD: nojail
+
+if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; them exit 0; fi
 
 . /etc/rc.subr
 


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


More information about the freebsd-bugs mailing list