summaryrefslogtreecommitdiffstats
path: root/usr.bin/lsvfs/lsvfs.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-04-05 21:03:05 +0000
committerpjd <pjd@FreeBSD.org>2007-04-05 21:03:05 +0000
commit7e73da14eb8410d6878c1e60cdb665d8a8c74c47 (patch)
tree608077732ab03acb392e93cd02387b0b39403bf6 /usr.bin/lsvfs/lsvfs.c
parenta4513e9da8410de9807fcc5d2c2387629787ca6d (diff)
downloadFreeBSD-src-7e73da14eb8410d6878c1e60cdb665d8a8c74c47.zip
FreeBSD-src-7e73da14eb8410d6878c1e60cdb665d8a8c74c47.tar.gz
Add security.jail.mount_allowed sysctl, which allows to mount and
unmount jail-friendly file systems from within a jail. Precisely it grants PRIV_VFS_MOUNT, PRIV_VFS_UNMOUNT and PRIV_VFS_MOUNT_NONUSER privileges for a jailed super-user. It is turned off by default. A jail-friendly file system is a file system which driver registers itself with VFCF_JAIL flag via VFS_SET(9) API. The lsvfs(1) command can be used to see which file systems are jail-friendly ones. There currently no jail-friendly file systems, ZFS will be the first one. In the future we may consider marking file systems like nullfs as jail-friendly. Reviewed by: rwatson
Diffstat (limited to 'usr.bin/lsvfs/lsvfs.c')
-rw-r--r--usr.bin/lsvfs/lsvfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/lsvfs/lsvfs.c b/usr.bin/lsvfs/lsvfs.c
index 1e486d7..1f23e1c 100644
--- a/usr.bin/lsvfs/lsvfs.c
+++ b/usr.bin/lsvfs/lsvfs.c
@@ -105,5 +105,10 @@ fmt_flags(int flags)
strcat(buf, "unicode");
}
+ if(flags & VFCF_JAIL) {
+ if(comma++) strcat(buf, ", ");
+ strcat(buf, "jail");
+ }
+
return buf;
}
OpenPOWER on IntegriCloud