summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_stats.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-06-09 18:49:19 +0000
committerpjd <pjd@FreeBSD.org>2005-06-09 18:49:19 +0000
commit47f442bcb9bd412e8e5d053dc5bf1d4c97d93b81 (patch)
tree4920e7fa66313114f8e377130095e6f5050c167e /sys/compat/linux/linux_stats.c
parent45eec321507d3992b03d03933268aefd7ac48dfa (diff)
downloadFreeBSD-src-47f442bcb9bd412e8e5d053dc5bf1d4c97d93b81.zip
FreeBSD-src-47f442bcb9bd412e8e5d053dc5bf1d4c97d93b81.tar.gz
Rename sysctl security.jail.getfsstatroot_only to security.jail.enforce_statfs
and extend its functionality: value policy 0 show all mount-points without any restrictions 1 show only mount-points below jail's chroot and show only part of the mount-point's path (if jail's chroot directory is /jails/foo and mount-point is /jails/foo/usr/home only /usr/home will be shown) 2 show only mount-point where jail's chroot directory is placed. Default value is 2. Discussed with: rwatson
Diffstat (limited to 'sys/compat/linux/linux_stats.c')
-rw-r--r--sys/compat/linux/linux_stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c
index 7ddb192..da08a10 100644
--- a/sys/compat/linux/linux_stats.c
+++ b/sys/compat/linux/linux_stats.c
@@ -331,8 +331,9 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args)
if (dev != NULL && vfinddev(dev, &vp)) {
if (vp->v_mount == NULL)
return (EINVAL);
- if (!prison_check_mount(td->td_ucred, vp->v_mount))
- return (EINVAL);
+ error = prison_canseemount(td->td_ucred, vp->v_mount);
+ if (error)
+ return (error);
#ifdef MAC
error = mac_check_mount_stat(td->td_ucred, vp->v_mount);
if (error)
OpenPOWER on IntegriCloud