bizarre mount_nullfs issue with jails / ezjail

Mars G Miro spry at anarchy.in.the.ph
Wed Apr 7 06:43:13 UTC 2010


On Wed, Apr 7, 2010 at 2:28 PM, Dan Naumov <dan.naumov at gmail.com> wrote:
>>> An additional question: how come "sade" and "sysinstall" which are run
>>> inside the jail can see (and I can only assume they can also operate
>>> on and damage) the real underlying disks of the host?
>>>
>>
>> Disks (as well as others you have in your host's /dev) aren't visible
>> inside jails.
>
> Well, somehow they are on my system.
>
> I guess I should've also clarified that the jail was installed using
> ezjail and not completely manually
>
> From /usr/local/etc/ezjail/semipublic
>
> export jail_semipublic_devfs_enable="YES"
> export jail_semipublic_devfs_ruleset="devfsrules_jail"
>

Well I'm not entirely familiar w/ ezjail but I use jails all the time,
and I can tell you that /dev in jails is very limited, here's a /dev
jail of mine:

mars at spry9:~> ls -al /dev/
total 2
crw-rw-rw-  1 root  wheel    0,  58 Mar 27 03:02 crypto
dr-xr-xr-x  2 root  wheel       512 Mar 27 03:12 fd
dr-xr-xr-x  2 root  wheel       512 Mar 30 20:00 iso9660
lrwxr-xr-x  1 root  wheel        14 Mar 27 03:12 log -> ../var/run/log
crw-rw-rw-  1 root  wheel    0,  33 Apr  7 14:33 null
crw-rw-rw-  1 root  wheel    0,   7 Mar 27 03:02 ptmx
dr-xr-xr-x  2 root  wheel       512 Mar 27 03:22 pts
crw-rw-rw-  1 root  wheel    0,  10 Mar 27 11:12 random
lrwxr-xr-x  1 root  wheel         4 Mar 27 03:12 stderr -> fd/2
lrwxr-xr-x  1 root  wheel         4 Mar 27 03:12 stdin -> fd/0
lrwxr-xr-x  1 root  wheel         4 Mar 27 03:12 stdout -> fd/1
lrwxr-xr-x  1 root  wheel         6 Mar 27 03:12 urandom -> random
crw-rw-rw-  1 root  wheel    0,  34 Mar 27 03:02 zero
mars at spry9:~>

So I guess it's a configuration issue w/ your jails.

> - Sincerely,
> Dan Naumov
>



-- 
cheers
mars
-----


More information about the freebsd-questions mailing list