Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2013 00:45:13 GMT
From:      anonymous <anonymous@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/177325: [jail] Jail umounts fstab in the wrong order
Message-ID:  <201303240045.r2O0jDp9067321@red.freebsd.org>
Resent-Message-ID: <201303240050.r2O0o0A6098602@freefall.freebsd.org>

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

>Number:         177325
>Category:       kern
>Synopsis:       [jail] Jail umounts fstab in the wrong order
>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:   Sun Mar 24 00:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     anonymous
>Release:        FreeBSD 9.1-RELEASE i386
>Organization:
>Environment:
FreeBSD FreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Thu Jan 24 01:27:54 PST 2013     root@SwordFish:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
The jail command doesn't reverse the order of fstab when dismounting.
>How-To-Repeat:
# cat /etc/jail.conf
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;

path = "/jails/${name}";
mount.fstab = "/etc/fstab.${name}";
host.hostname = "${name}.FreeBSD";



build {
  interface = "fxp0";
  ip4.addr = "10.0.0.1";
  allow.raw_sockets;
}

# cat /etc/fstab.build 
/usr/ports		/jails/build/usr/ports			nullfs	rw,noatime	0	0
/usr/ports/distfiles	/jails/build/usr/ports/distfiles	nullfs	rw,noatime	0	0
/usr/ports/packages	/jails/build/usr/ports/packages		nullfs	rw,noatime	0	0
/usr/src		/jails/build/usr/src			nullfs	ro,noatime	0	0

# jail -cv build
build: run command: /sbin/ifconfig fxp0 inet 10.0.0.1 netmask 255.255.255.255 alias
build: run command: /sbin/mount -t nullfs -o rw,noatime /usr/ports /jails/build/usr/ports
build: run command: /sbin/mount -t nullfs -o rw,noatime /usr/ports/distfiles /jails/build/usr/ports/distfiles
build: run command: /sbin/mount -t nullfs -o rw,noatime /usr/ports/packages /jails/build/usr/ports/packages
build: run command: /sbin/mount -t nullfs -o ro,noatime /usr/src /jails/build/usr/src
build: run command: /sbin/mount -t devfs -oruleset=4 . /jails/build/dev
build: jail_set(JAIL_CREATE) persist name=build path=/jails/build host.hostname=build.FreeBSD ip4.addr=10.0.0.1 allow.raw_sockets
build: created
build: run command in jail: /bin/sh /etc/rc
/etc/rc: WARNING: $hostname is not set -- see rc.conf(5).
Creating and/or trimming log files.
ln: /dev/log: Operation not permitted
Starting syslogd.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout
Clearing /tmp (X related).
Updating motd:.
Starting cron.

Sat Mar 23 17:36:46 PDT 2013
build: jail_set(JAIL_UPDATE) jid=6 nopersist
# jail -rv build
build: run command in jail: /bin/sh /etc/rc.shutdown
Stopping cron.
Waiting for PIDS: 3874.
Terminated
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



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