aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2009-07-02 14:19:33 +0000
committerJamie Gritton <jamie@FreeBSD.org>2009-07-02 14:19:33 +0000
commitf0899a3460cc7a270f2b48260187db12a5b5f5fc (patch)
treefd9e91029e08bd9192f62fe636c2e90c7e061d69 /sys/kern/vfs_subr.c
parent01624369748c30eff8730252299dc7150f5af77f (diff)
downloadsrc-f0899a3460cc7a270f2b48260187db12a5b5f5fc.tar.gz
src-f0899a3460cc7a270f2b48260187db12a5b5f5fc.zip
Call prison_check from vfs_suser rather than re-implementing it.
Approved by: re (kib), bz (mentor)
Notes
Notes: svn path=/head/; revision=195285
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 7aca90ac4e3e..3beb881f3ed2 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -461,8 +461,7 @@ vfs_suser(struct mount *mp, struct thread *td)
* If the file system was mounted outside the jail of the calling
* thread, deny immediately.
*/
- if (mp->mnt_cred->cr_prison != td->td_ucred->cr_prison &&
- !prison_ischild(td->td_ucred->cr_prison, mp->mnt_cred->cr_prison))
+ if (prison_check(td->td_ucred, mp->mnt_cred) != 0)
return (EPERM);
/*