PERFORCE change 15841 for review

Robert Watson rwatson at freebsd.org
Mon Aug 12 01:40:55 GMT 2002


http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15841

Change 15841 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list