PERFORCE change 22437 for review

Robert Watson rwatson at freebsd.org
Wed Dec 18 00:56:02 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=22437

Change 22437 by rwatson at rwatson_paprika on 2002/12/17 16:55:05

	Perform VOP_GETATTR() before mac_check_vnode_exec() so that
	the cached attributes are available to MAC modules.
	
	Submitted by:	mike halderman <mrh at nosc.mil>

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_exec.c#51 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/kern_exec.c#51 (text+ko) ====

@@ -1101,17 +1101,17 @@
 
 	td = curthread;			/* XXXKSE */
 
+	/* Get file attributes */
+	error = VOP_GETATTR(vp, attr, td->td_ucred, td);
+	if (error)
+		return (error);
+
 #ifdef MAC
 	error = mac_check_vnode_exec(td->td_ucred, imgp->vp, imgp);
 	if (error)
 		return (error);
 #endif
 	
-	/* Get file attributes */
-	error = VOP_GETATTR(vp, attr, td->td_ucred, td);
-	if (error)
-		return (error);
-
 	/*
 	 * 1) Check if file execution is disabled for the filesystem that this
 	 *	file resides on.
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