svn commit: r195285 - head/sys/kern

Jamie Gritton jamie at FreeBSD.org
Thu Jul 2 14:19:34 UTC 2009


Author: jamie
Date: Thu Jul  2 14:19:33 2009
New Revision: 195285
URL: http://svn.freebsd.org/changeset/base/195285

Log:
  Call prison_check from vfs_suser rather than re-implementing it.
  
  Approved by:	re (kib), bz (mentor)

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Thu Jul  2 12:41:21 2009	(r195284)
+++ head/sys/kern/vfs_subr.c	Thu Jul  2 14:19:33 2009	(r195285)
@@ -461,8 +461,7 @@ vfs_suser(struct mount *mp, struct threa
 	 * 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);
 
 	/*


More information about the svn-src-all mailing list