Re: mount_nullfs inside a jail



On Tue, Jul 24, 2007 at 06:03:47PM +0400, Boris Samorodov wrote:
On Mon, 23 Jul 2007 15:33:33 +0200 Pawel Jakub Dawidek wrote:
As you can see, nullfs doesn't have 'jail' flag. The only jail-friendly
file system currently is ZFS. Nullfs is a good candidate for a
jail-friendly file system, but is not marked as such yet.

Does somebody know if only a flag is missing or not?

You may try changing the line in /sys/fs/nullfs/null_vfsops.c from:

VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK);

to:

VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK | VFCF_JAIL);

but I don't think anyone did any security analysis of this yet.

--
Pawel Jakub Dawidek http://www.wheel.pl
pjd@xxxxxxxxxxx http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!

Attachment: pgprNPByam5vY.pgp
Description: PGP signature