Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2002 16:56:02 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 22437 for review
Message-ID:  <200212180056.gBI0u2SN078996@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=22437

Change 22437 by rwatson@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@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@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?200212180056.gBI0u2SN078996>