Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2002 07:19:04 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14601 for review
Message-ID:  <200207211419.g6LEJ4UB082322@freefall.freebsd.org>

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

Change 14601 by rwatson@rwatson_curry on 2002/07/21 07:18:45

	Mediate access to fhopen().  Note the truncation check is still
	required.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#56 edit

Differences ...

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

@@ -4467,17 +4467,16 @@
 	}
 	if (fmode & FREAD)
 		mode |= VREAD;
+#ifdef MAC
+	error = mac_cred_check_open_vnode(td->td_ucred, vp, mode);
+	if (error)
+		goto bad;
+#endif
 	if (mode) {
 		error = VOP_ACCESS(vp, mode, td->td_ucred, td);
 		if (error)
 			goto bad;
 	}
-#ifdef MAC
-	/*
-	 * XXXMAC: Mediation required here.  Also check that the rest of
-	 * this is in sync with vn_open().
-	 */
-#endif
 	if (fmode & O_TRUNC) {
 		VOP_UNLOCK(vp, 0, td);				/* XXX */
 		if ((error = vn_start_write(NULL, &mp, V_WAIT | PCATCH)) != 0) {

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?200207211419.g6LEJ4UB082322>