]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make it easier for filesystems to count themselves as jail-enabled,
authorjamie <jamie@FreeBSD.org>
Fri, 4 May 2018 20:54:27 +0000 (20:54 +0000)
committerjamie <jamie@FreeBSD.org>
Fri, 4 May 2018 20:54:27 +0000 (20:54 +0000)
commit1c11f552d63c8d13159b579aed059a7649bbf5aa
tree3ababcca953402d6c1fa7ca587685de9a95cbdf6
parentbd07da39ba6bc29fdde1a53c5f8427cfa7bfa358
Make it easier for filesystems to count themselves as jail-enabled,
by doing most of the work in a new function prison_add_vfs in kern_jail.c
Now a jail-enabled filesystem need only mark itself with VFCF_JAIL, and
the rest is taken care of.  This includes adding a jail parameter like
allow.mount.foofs, and a sysctl like security.jail.mount_foofs_allowed.
Both of these used to be a static list of known filesystems, with
predefined permission bits.

Reviewed by: kib
Differential Revision: D14681
17 files changed:
lib/libjail/jail.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
sys/compat/linprocfs/linprocfs.c
sys/compat/linsysfs/linsysfs.c
sys/fs/devfs/devfs_vfsops.c
sys/fs/fdescfs/fdesc_vfsops.c
sys/fs/nullfs/null_vfsops.c
sys/fs/procfs/procfs.c
sys/fs/pseudofs/pseudofs.h
sys/fs/tmpfs/tmpfs_vfsops.c
sys/kern/kern_jail.c
sys/kern/vfs_init.c
sys/kern/vfs_mount.c
sys/kern/vfs_subr.c
sys/sys/jail.h
sys/sys/mount.h
usr.sbin/jail/jail.8