From f0899a3460cc7a270f2b48260187db12a5b5f5fc Mon Sep 17 00:00:00 2001 From: Jamie Gritton Date: Thu, 2 Jul 2009 14:19:33 +0000 Subject: [PATCH] Call prison_check from vfs_suser rather than re-implementing it. Approved by: re (kib), bz (mentor) --- sys/kern/vfs_subr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7aca90ac4e3..3beb881f3ed 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); /*