Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Dec 2002 10:10:01 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 22840 for review
Message-ID:  <200212281810.gBSIA14h061100@repoman.freebsd.org>

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

Change 22840 by rwatson@rwatson_paprika on 2002/12/28 10:09:13

	Map VAPPEND into VWRITE when making mac_bsdextended access control
	decisions.  This should fix open failures with the append-only
	flag set.
	
	Reported by:	"Daniel C. Sobral" <dcs@newsguy.com>

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_bsdextended/mac_bsdextended.c#67 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_bsdextended/mac_bsdextended.c#67 (text+ko) ====

@@ -279,6 +279,15 @@
 		if (rules[i] == NULL)
 			continue;
 
+		/*
+		 * Since we don't separately handle append, map append to
+		 * write.
+		 */
+		if (acc_mode & VAPPEND) {
+			acc_mode &= ~VAPPEND;
+			acc_mode |= VWRITE;
+		}
+
 		error = mac_bsdextended_rulecheck(rules[i], cred, object_uid,
 		    object_gid, acc_mode);
 		if (error)

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?200212281810.gBSIA14h061100>