From owner-p4-projects Thu Jul 18 11:54:55 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B235537B405; Thu, 18 Jul 2002 11:54:50 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5218437B401 for ; Thu, 18 Jul 2002 11:54:50 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 108D543E58 for ; Thu, 18 Jul 2002 11:54:50 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6IIsnJU043316 for ; Thu, 18 Jul 2002 11:54:49 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6IIsn61043313 for perforce@freebsd.org; Thu, 18 Jul 2002 11:54:49 -0700 (PDT) Date: Thu, 18 Jul 2002 11:54:49 -0700 (PDT) Message-Id: <200207181854.g6IIsn61043313@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 14435 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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