Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 2002 11:54:49 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14435 for review
Message-ID:  <200207181854.g6IIsn61043313@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14435

Change 14435 by rwatson@rwatson_tislabs on 2002/07/18 11:54:44

	Bump the MULTILABEL check on label write a little higher in
	the stack so that it is enforced at the framework layer rather
	than the file system layer.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#168 edit

Differences ...

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

@@ -2340,9 +2340,6 @@
 
 	ASSERT_VOP_LOCKED(vp, "vop_stdsetlabel_ea");
 
-	if ((vp->v_mount->mnt_flag & MNT_MULTILABEL) == 0)
-		return (EOPNOTSUPP);
-
 	error = mac_externalize(intlabel, &extmac);
 	if (error)
 		return (error);
@@ -2371,6 +2368,10 @@
 			printf("vn_setlabel: null v_mount with non-VT_NON\n");
 		return (EBADF);
 	}
+
+	if ((vp->v_mount->mnt_label & MNT_MULTILABEL) == 0)
+		return (EOPNOTSUPP);
+
 	/*
 	 * Multi-phase commit.  First check the policies to confirm the
 	 * change is OK.  Then commit via the filesystem.  Finally,

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?200207181854.g6IIsn61043313>