From 47f442bcb9bd412e8e5d053dc5bf1d4c97d93b81 Mon Sep 17 00:00:00 2001 From: pjd Date: Thu, 9 Jun 2005 18:49:19 +0000 Subject: 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 --- sys/compat/linux/linux_stats.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/compat/linux/linux_stats.c') 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) -- cgit v1.1