Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 2002 18:40:55 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 15841 for review
Message-ID:  <200208120140.g7C1etBe004497@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15841

Change 15841 by rwatson@rwatson_paprika on 2002/08/11 18:40:49

	Sync to the version of the MAC checks in -CURRENT: use the
	thread not process credential (we don't hold appropriate locks
	for that, and it's inconsistent with other checks), and since
	it's a short #ifdef, drop the comment on #endif.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_misc.c#14 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_misc.c#14 (text+ko) ====

@@ -314,11 +314,10 @@
 	}
 
 #ifdef MAC
-	/* Use process's credentials to check directory search MAC. */
-	error = mac_check_vnode_readdir(td->td_proc->p_ucred, vp);
+	error = mac_check_vnode_readdir(td->td_ucred, vp);
 	if (error)
 		goto out;
-#endif /* MAC */
+#endif
 
 	error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag,
 						&ncookies, &cookies);
@@ -477,11 +476,10 @@
          * we massage it into user space, one record at a time.
          */
 #ifdef MAC
-	/* Use process's credentials to check directory search MAC. */
-	error = mac_check_vnode_readdir(td->td_proc->p_ucred, vp);
+	error = mac_check_vnode_readdir(td->td_ucred, vp);
 	if (error)
 		goto out;
-#endif /* MAC */
+#endif
 	error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies,
 	    &cookiebuf);
 	if (error) {

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208120140.g7C1etBe004497>