diff options
author | jamie <jamie@FreeBSD.org> | 2009-07-02 14:19:33 +0000 |
---|---|---|
committer | jamie <jamie@FreeBSD.org> | 2009-07-02 14:19:33 +0000 |
commit | c0264518e962730af09892510b13ca35bdb38741 (patch) | |
tree | fd9e91029e08bd9192f62fe636c2e90c7e061d69 /sys | |
parent | c7f054429b8e36f51c859e84dedc1140a0ff16cf (diff) | |
download | FreeBSD-src-c0264518e962730af09892510b13ca35bdb38741.zip FreeBSD-src-c0264518e962730af09892510b13ca35bdb38741.tar.gz |
Call prison_check from vfs_suser rather than re-implementing it.
Approved by: re (kib), bz (mentor)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_subr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7aca90ac..3beb881 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); /* |