PERFORCE change 111033 for review

Todd Miller millert at FreeBSD.org
Mon Dec 4 09:59:30 PST 2006


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

Change 111033 by millert at millert_g5tower on 2006/12/04 17:59:04

	Be sure to label aliased vnodes too.
	
	The vnode created by bdevvp() has no label and when
	checkalias() in vnode_create() returns that vnode for devfs
	to use, we failed to call mac_vnode_label_associate_singlelabel()

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#9 edit

Differences ...

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

@@ -3678,15 +3678,14 @@
 			if (param->vnfs_mp) {
 					if (param->vnfs_mp->mnt_kern_flag & MNTK_LOCK_LOCAL)
 						vp->v_flag |= VLOCKLOCAL;
-			        if (insert) {
 #ifdef MAC
-					if ((vfs_flags(param->vnfs_mp) & MNT_MULTILABEL) == 0) {
-						/* No locks or references needed */
-						mac_vnode_label_associate_singlelabel(param->vnfs_mp, vp);
-						vp->v_lflag |= VL_LABELED;
-					}
+				if ((vfs_flags(param->vnfs_mp) & MNT_MULTILABEL) == 0) {
+					/* No locks or references needed */
+					mac_vnode_label_associate_singlelabel(param->vnfs_mp, vp);
+					vp->v_lflag |= VL_LABELED;
+				}
 #endif
-
+			        if (insert) {
 				        /*
 					 * enter in mount vnode list
 					 */


More information about the p4-projects mailing list