Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2002 12:29:39 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14623 for review
Message-ID:  <200207211929.g6LJTdT6093841@freefall.freebsd.org>

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

Change 14623 by rwatson@rwatson_curry on 2002/07/21 12:29:01

	Teach SVR4 fd_revoke() implementation about MAC.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_fcntl.c#6 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_fcntl.c#6 (text+ko) ====

@@ -30,12 +30,16 @@
  * 
  * $FreeBSD: src/sys/compat/svr4/svr4_fcntl.c,v 1.23 2002/04/01 21:30:30 jhb Exp $
  */
+
+#include "opt_mac.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/file.h>
 #include <sys/filedesc.h>
 /*#include <sys/ioctl.h>*/
 #include <sys/lock.h>
+#include <sys/mac.h>
 #include <sys/mount.h>
 #include <sys/mutex.h>
 #include <sys/namei.h>
@@ -260,6 +264,14 @@
 		goto out;
 	}
 
+#ifdef MAC
+	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
+	error = mac_cred_check_revoke_vnode(td->td_ucred, vp);
+	VOP_UNLOCK(vp, 0, td);
+	if (error)
+		goto out;
+#endif
+
 	if ((error = VOP_GETATTR(vp, &vattr, td->td_ucred, td)) != 0)
 		goto out;
 

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?200207211929.g6LJTdT6093841>