Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2007 16:25:22 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 113366 for review
Message-ID:  <200701221625.l0MGPMCr031755@repoman.freebsd.org>

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

Change 113366 by millert@millert_macbook on 2007/01/22 16:24:39

	mac_vnode_check_access() now takes {R,W,X}_OK flags instead
	of V{READ,WRITE,EXEC}.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_attrlist.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_attrlist.c#5 (text+ko) ====

@@ -697,15 +697,15 @@
 		 */
 		if (perms & W_OK)
 			if (mac_vnode_check_access(vfs_context_ucred(ctx),
-			    vp, VWRITE) != 0)
+			    vp, W_OK) != 0)
 				perms &= ~W_OK;
 		if (perms & R_OK)
 			if (mac_vnode_check_access(vfs_context_ucred(ctx),
-			    vp, VREAD) != 0)
+			    vp, R_OK) != 0)
 				perms &= ~R_OK;
 		if (perms & X_OK)
 			if (mac_vnode_check_access(vfs_context_ucred(ctx),
-			     vp, VEXEC) != 0)
+			     vp, X_OK) != 0)
 				perms &= ~X_OK;
 #endif /* MAC */
 		KAUTH_DEBUG("ATTRLIST - returning user access %x", perms);
@@ -1195,15 +1195,15 @@
 		 */
 		if (perms & W_OK)
 			if (mac_vnode_check_access(vfs_context_ucred(&context),
-			    vp, VWRITE) != 0)
+			    vp, W_OK) != 0)
 				perms &= ~W_OK;
 		if (perms & R_OK)
 			if (mac_vnode_check_access(vfs_context_ucred(&context),
-			    vp, VREAD) != 0)
+			    vp, R_OK) != 0)
 				perms &= ~R_OK;
 		if (perms & X_OK)
 			if (mac_vnode_check_access(vfs_context_ucred(&context),
-			    vp, VEXEC) != 0)
+			    vp, X_OK) != 0)
 				perms &= ~X_OK;
 #endif /* MAC */
 		VFS_DEBUG(ctx, vp, "ATTRLIST - granting perms %d", perms);



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