PERFORCE change 150528 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Fri Sep 26 19:37:10 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=150528

Change 150528 by trasz at trasz_traszkan on 2008/09/26 19:36:51

	More vaccess_t - it seems pretty complete now - and removing
	Vflags abuse.

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c#4 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/compat/opensolaris/sys/policy.h#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/compat/linux/linux_getcwd.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/compat/linux/linux_misc.c#6 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/cd9660/cd9660_node.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/cd9660/cd9660_vfsops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/fdescfs/fdesc_vnops.c#4 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/msdosfs/msdosfs_vfsops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/unionfs/union_vfsops.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/unionfs/union_vnops.c#4 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/reiserfs/reiserfs_vfsops.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/xfs/FreeBSD/xfs_super.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/uipc_mqueue.c#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/uipc_shm.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_subr.c#14 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_syscalls.c#6 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_vnops.c#6 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/nfsserver/nfs_serv.c#4 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac/mac_framework.h#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac/mac_policy.h#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac/mac_vfs.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_biba/mac_biba.c#7 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_bsdextended/mac_bsdextended.c#6 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_ifoff/mac_ifoff.c#3 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_lomac/mac_lomac.c#7 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_mls/mac_mls.c#7 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_stub/mac_stub.c#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_test/mac_test.c#5 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/sys/extattr.h#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ffs/ffs_vfsops.c#11 edit
.. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ffs/ffs_vnops.c#4 edit

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c#4 (text+ko) ====

@@ -91,7 +91,7 @@
 
 int
 secpolicy_vnode_access(struct ucred *cred, struct vnode *vp, uint64_t owner,
-    int mode)
+    vaccess_t mode)
 {
 
 	if ((mode & VREAD) && priv_check_cred(cred, PRIV_VFS_READ, 0) != 0) {

==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/compat/opensolaris/sys/policy.h#2 (text+ko) ====

@@ -46,7 +46,7 @@
 int	secpolicy_vnode_stky_modify(struct ucred *cred);
 int	secpolicy_vnode_remove(struct ucred *cred);
 int	secpolicy_vnode_access(struct ucred *cred, struct vnode *vp,
-	    uint64_t owner, int mode);
+	    uint64_t owner, vaccess_t mode);
 int	secpolicy_vnode_setdac(struct ucred *cred, uid_t owner);
 int	secpolicy_vnode_setattr(struct ucred *cred, struct vnode *vp,
 	    struct vattr *vap, const struct vattr *ovap, int flags,

==== //depot/projects/soc2008/trasz_nfs4acl/sys/compat/linux/linux_getcwd.c#3 (text+ko) ====

@@ -307,7 +307,7 @@
 	struct vnode *uvp = NULL;
 	char *bp = NULL;
 	int error;
-	int perms = VEXEC;
+	vaccess_t perms = VEXEC;
 
 	if (rvp == NULL) {
 		rvp = fdp->fd_rdir;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/compat/linux/linux_misc.c#6 (text+ko) ====

@@ -306,7 +306,7 @@
 	 * than vn_open().
 	 */
 #ifdef MAC
-	error = mac_vnode_check_open(td->td_ucred, vp, FREAD);
+	error = mac_vnode_check_open(td->td_ucred, vp, VREAD);
 	if (error)
 		goto cleanup;
 #endif

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/cd9660/cd9660_node.c#2 (text+ko) ====

@@ -156,24 +156,24 @@
 
 		if (isonum_711(ap->version) == 1) {
 			if (!(ap->perm[0]&0x40))
-				inop->inode.iso_mode |= VEXEC >> 6;
+				inop->inode.iso_mode |= S_IXOTH;
 			if (!(ap->perm[0]&0x10))
-				inop->inode.iso_mode |= VREAD >> 6;
+				inop->inode.iso_mode |= S_IROTH;
 			if (!(ap->perm[0]&4))
-				inop->inode.iso_mode |= VEXEC >> 3;
+				inop->inode.iso_mode |= S_IXGRP;
 			if (!(ap->perm[0]&1))
-				inop->inode.iso_mode |= VREAD >> 3;
+				inop->inode.iso_mode |= S_IRGRP;
 			if (!(ap->perm[1]&0x40))
-				inop->inode.iso_mode |= VEXEC;
+				inop->inode.iso_mode |= S_IXUSR;
 			if (!(ap->perm[1]&0x10))
-				inop->inode.iso_mode |= VREAD;
+				inop->inode.iso_mode |= S_IRUSR;
 			inop->inode.iso_uid = isonum_723(ap->owner); /* what about 0? */
 			inop->inode.iso_gid = isonum_723(ap->group); /* what about 0? */
 		} else
 			ap = NULL;
 	}
 	if (!ap) {
-		inop->inode.iso_mode |= VREAD|VEXEC|(VREAD|VEXEC)>>3|(VREAD|VEXEC)>>6;
+		inop->inode.iso_mode |= S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
 		inop->inode.iso_uid = (uid_t)0;
 		inop->inode.iso_gid = (gid_t)0;
 	}

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/cd9660/cd9660_vfsops.c#2 (text+ko) ====

@@ -129,7 +129,7 @@
 	struct vnode *devvp;
 	char *fspec;
 	int error;
-	mode_t accessmode;
+	vaccess_t accessmode;
 	struct nameidata ndp;
 	struct iso_mnt *imp = 0;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/fdescfs/fdesc_vnops.c#4 (text+ko) ====

@@ -424,10 +424,8 @@
 			VATTR_NULL(vap);
 			vap->va_type = IFTOVT(stb.st_mode);
 			vap->va_mode = stb.st_mode;
-#define FDRX (VREAD|VEXEC)
 			if (vap->va_type == VDIR)
-				vap->va_mode &= ~((FDRX)|(FDRX>>3)|(FDRX>>6));
-#undef FDRX
+				vap->va_mode &= ~(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
 			vap->va_nlink = 1;
 			vap->va_flags = 0;
 			vap->va_bytes = stb.st_blocks * stb.st_blksize;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/msdosfs/msdosfs_vfsops.c#2 (text+ko) ====

@@ -241,7 +241,7 @@
 	struct msdosfsmount *pmp = NULL;
 	struct nameidata ndp;
 	int error, flags;
-	mode_t accessmode;
+	vaccess_t accessmode;
 	char *from;
 
 	if (vfs_filteropt(mp->mnt_optnew, msdosfs_opts))

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/unionfs/union_vfsops.c#3 (text+ko) ====

@@ -67,43 +67,6 @@
 static struct vfsops unionfs_vfsops;
 
 /*
- * Exchange from userland file mode to vmode.
- */
-static u_short 
-mode2vmode(mode_t mode)
-{
-	u_short		ret;
-
-	ret = 0;
-
-	/* other */
-	if (mode & S_IXOTH)
-		ret |= VEXEC >> 6;
-	if (mode & S_IWOTH)
-		ret |= VWRITE >> 6;
-	if (mode & S_IROTH)
-		ret |= VREAD >> 6;
-
-	/* group */
-	if (mode & S_IXGRP)
-		ret |= VEXEC >> 3;
-	if (mode & S_IWGRP)
-		ret |= VWRITE >> 3;
-	if (mode & S_IRGRP)
-		ret |= VREAD >> 3;
-
-	/* owner */
-	if (mode & S_IXUSR)
-		ret |= VEXEC;
-	if (mode & S_IWUSR)
-		ret |= VWRITE;
-	if (mode & S_IRUSR)
-		ret |= VREAD;
-
-	return (ret);
-}
-
-/*
  * Mount unionfs layer.
  */
 static int
@@ -121,8 +84,8 @@
 	int		below;
 	uid_t		uid;
 	gid_t		gid;
-	u_short		udir;
-	u_short		ufile;
+	vaccess_t	udir;
+	vaccess_t	ufile;
 	unionfs_copymode copymode;
 	unionfs_whitemode whitemode;
 	struct componentname fakecn;
@@ -174,7 +137,7 @@
 			vfs_mount_error(mp, "Invalid udir");
 			return (EINVAL);
 		}
-		udir = mode2vmode(udir);
+		udir &= S_IRWXU | S_IRWXG | S_IRWXO;
 	}
 	if (vfs_getopt(mp->mnt_optnew, "ufile", (void **)&tmp, NULL) == 0) {
 		if (tmp != NULL)
@@ -183,7 +146,7 @@
 			vfs_mount_error(mp, "Invalid ufile");
 			return (EINVAL);
 		}
-		ufile = mode2vmode(ufile);
+		ufile &= S_IRWXU | S_IRWXG | S_IRWXO;
 	}
 	/* check umask, uid and gid */
 	if (udir == 0 && ufile != 0)

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/unionfs/union_vnops.c#4 (text+ko) ====

@@ -583,7 +583,7 @@
  * Check the access mode toward shadow file/dir.
  */
 static int
-unionfs_check_corrected_access(u_short mode,
+unionfs_check_corrected_access(vaccess_t mode,
 			     struct vattr *va,
 			     struct ucred *cred)
 {

==== //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/ext2fs/ext2_vfsops.c#3 (text+ko) ====

@@ -137,7 +137,7 @@
 	struct ext2_sb_info *fs;
 	char *path, *fspec;
 	int error, flags, len;
-	mode_t accessmode;
+	vaccess_t accessmode;
 	struct nameidata nd, *ndp = &nd;
 
 	opts = mp->mnt_optnew;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/reiserfs/reiserfs_vfsops.c#2 (text+ko) ====

@@ -74,7 +74,7 @@
 {
 	size_t size;
 	int error, len;
-	mode_t accessmode;
+	vaccess_t accessmode;
 	char *path, *fspec;
 	struct vnode *devvp;
 	struct vfsoptlist *opts;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/gnu/fs/xfs/FreeBSD/xfs_super.c#2 (text+ko) ====

@@ -133,7 +133,7 @@
 	struct vnode		*devvp;
 	struct g_consumer	*cp;
 	struct g_provider	*pp;
-	mode_t			accessmode;
+	vaccess_t		accessmode;
 
 	td = curthread;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/uipc_mqueue.c#5 (text+ko) ====

@@ -2005,7 +2005,7 @@
 		if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) {
 			error = EEXIST;
 		} else {
-			int acc_mode = 0;
+			vaccess_t acc_mode = 0;
 
 			if (flags & FREAD)
 				acc_mode |= VREAD;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/uipc_shm.c#3 (text+ko) ====

@@ -367,7 +367,7 @@
 static int
 shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags)
 {
-	int acc_mode;
+	vaccess_t acc_mode;
 
 	acc_mode = 0;
 	if (flags & FREAD)

==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_subr.c#14 (text+ko) ====

@@ -53,6 +53,7 @@
 #include <sys/dirent.h>
 #include <sys/event.h>
 #include <sys/eventhandler.h>
+#include <sys/vnode.h>
 #include <sys/extattr.h>
 #include <sys/file.h>
 #include <sys/fcntl.h>
@@ -71,7 +72,6 @@
 #include <sys/sysctl.h>
 #include <sys/syslog.h>
 #include <sys/vmmeter.h>
-#include <sys/vnode.h>
 
 #include <machine/stdarg.h>
 
@@ -3564,7 +3564,7 @@
  */
 int
 extattr_check_cred(struct vnode *vp, int attrnamespace, struct ucred *cred,
-    struct thread *td, int access)
+    struct thread *td, vaccess_t access)
 {
 
 	/*

==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_syscalls.c#6 (text+ko) ====

@@ -2032,7 +2032,8 @@
 	struct ucred	*cred;
 	struct thread	*td;
 {
-	int error, flags;
+	int error;
+	vaccess_t flags;
 
 	/* Flags == 0 means only check for existence. */
 	error = 0;
@@ -4335,7 +4336,8 @@
 	struct flock lf;
 	struct file *fp;
 	register struct filedesc *fdp = p->p_fd;
-	int fmode, mode, error, type;
+	int fmode, error, type;
+	vaccess_t mode;
 	struct file *nfp;
 	int vfslocked;
 	int indx;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_vnops.c#6 (text+ko) ====

@@ -115,7 +115,8 @@
 	struct thread *td = ndp->ni_cnd.cn_thread;
 	struct vattr vat;
 	struct vattr *vap = &vat;
-	int mode, fmode, error;
+	int fmode, error;
+	vaccess_t mode;
 	int vfslocked, mpsafe;
 
 	mpsafe = ndp->ni_cnd.cn_flags & MPSAFE;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/nfsserver/nfs_serv.c#4 (text+ko) ====

@@ -138,7 +138,7 @@
 SYSCTL_STRUCT(_vfs_nfsrv, NFS_NFSRVSTATS, nfsrvstats, CTLFLAG_RW,
 	&nfsrvstats, nfsrvstats, "S,nfsrvstats");
 
-static int	nfsrv_access(struct vnode *, int, struct ucred *, int,
+static int	nfsrv_access(struct vnode *, vaccess_t, struct ucred *, int,
 		    struct thread *, int);
 static void	nfsrvw_coalesce(struct nfsrv_descript *,
 		    struct nfsrv_descript *);
@@ -4235,7 +4235,7 @@
  * will return EPERM instead of EACCESS. EPERM is always an error.
  */
 static int
-nfsrv_access(struct vnode *vp, int flags, struct ucred *cred,
+nfsrv_access(struct vnode *vp, vaccess_t flags, struct ucred *cred,
     int rdonly, struct thread *td, int override)
 {
 	struct vattr vattr;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac/mac_framework.h#5 (text+ko) ====

@@ -87,6 +87,7 @@
 struct vop_setlabel_args;
 
 #include <sys/acl.h>			/* XXX acl_type_t */
+#include <sys/vnode.h>			/* vaccess_t */
 
 /*
  * Entry points to the TrustedBSD MAC Framework from the remainder of the
@@ -355,7 +356,7 @@
 int	mac_vnode_associate_extattr(struct mount *mp, struct vnode *vp);
 void	mac_vnode_associate_singlelabel(struct mount *mp, struct vnode *vp);
 int	mac_vnode_check_access(struct ucred *cred, struct vnode *vp,
-	    int acc_mode);
+	    vaccess_t acc_mode);
 int	mac_vnode_check_chdir(struct ucred *cred, struct vnode *dvp);
 int	mac_vnode_check_chroot(struct ucred *cred, struct vnode *dvp);
 int	mac_vnode_check_create(struct ucred *cred, struct vnode *dvp,
@@ -381,7 +382,7 @@
 int	mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp,
 	    int prot);
 int	mac_vnode_check_open(struct ucred *cred, struct vnode *vp,
-	    int acc_mode);
+	    vaccess_t acc_mode);
 int	mac_vnode_check_poll(struct ucred *active_cred,
 	    struct ucred *file_cred, struct vnode *vp);
 int	mac_vnode_check_read(struct ucred *active_cred,

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac/mac_policy.h#5 (text+ko) ====

@@ -61,6 +61,7 @@
  * alphabetically.
  */
 #include <sys/acl.h>	/* XXX acl_type_t */
+#include <sys/vnode.h>	/* XXX vaccess_t */
 
 struct acl;
 struct auditinfo;
@@ -516,7 +517,8 @@
 		    struct label *mplabel, struct vnode *vp,
 		    struct label *vplabel);
 typedef int	(*mpo_vnode_check_access_t)(struct ucred *cred,
-		    struct vnode *vp, struct label *vplabel, int acc_mode);
+		    struct vnode *vp, struct label *vplabel,
+		    vaccess_t acc_mode);
 typedef int	(*mpo_vnode_check_chdir_t)(struct ucred *cred,
 		    struct vnode *dvp, struct label *dvplabel);
 typedef int	(*mpo_vnode_check_chroot_t)(struct ucred *cred,
@@ -557,7 +559,8 @@
 typedef int	(*mpo_vnode_check_mprotect_t)(struct ucred *cred,
 		    struct vnode *vp, struct label *vplabel, int prot);
 typedef int	(*mpo_vnode_check_open_t)(struct ucred *cred,
-		    struct vnode *vp, struct label *vplabel, int acc_mode);
+		    struct vnode *vp, struct label *vplabel,
+		    vaccess_t acc_mode);
 typedef int	(*mpo_vnode_check_poll_t)(struct ucred *active_cred,
 		    struct ucred *file_cred, struct vnode *vp,
 		    struct label *vplabel);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac/mac_vfs.c#3 (text+ko) ====

@@ -362,7 +362,7 @@
 }
 
 int
-mac_vnode_check_access(struct ucred *cred, struct vnode *vp, int acc_mode)
+mac_vnode_check_access(struct ucred *cred, struct vnode *vp, vaccess_t acc_mode)
 {
 	int error;
 
@@ -546,7 +546,7 @@
 }
 
 int
-mac_vnode_check_open(struct ucred *cred, struct vnode *vp, int acc_mode)
+mac_vnode_check_open(struct ucred *cred, struct vnode *vp, vaccess_t acc_mode)
 {
 	int error;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_biba/mac_biba.c#7 (text+ko) ====

@@ -46,6 +46,7 @@
 
 #include <sys/param.h>
 #include <sys/conf.h>
+#include <sys/vnode.h>
 #include <sys/extattr.h>
 #include <sys/kernel.h>
 #include <sys/ksem.h>
@@ -59,7 +60,6 @@
 #include <sys/sysproto.h>
 #include <sys/sysent.h>
 #include <sys/systm.h>
-#include <sys/vnode.h>
 #include <sys/file.h>
 #include <sys/socket.h>
 #include <sys/socketvar.h>
@@ -2819,7 +2819,7 @@
 
 static int
 biba_vnode_check_open(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 	struct mac_biba *subj, *obj;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_bsdextended/mac_bsdextended.c#6 (text+ko) ====

@@ -219,7 +219,8 @@
 
 static int
 ugidfw_rulecheck(struct mac_bsdextended_rule *rule,
-    struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode)
+    struct ucred *cred, struct vnode *vp, struct vattr *vap,
+    vaccess_t acc_mode)
 {
 	int match;
 	int i;
@@ -395,7 +396,7 @@
 
 static int
 ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap,
-    int acc_mode)
+    vaccess_t acc_mode)
 {
 	int error, i;
 
@@ -479,7 +480,7 @@
 
 static int
 ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 
 	return (ugidfw_check_vp(cred, vp, acc_mode));
@@ -585,7 +586,7 @@
 
 static int
 ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 
 	return (ugidfw_check_vp(cred, vp, acc_mode));

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_ifoff/mac_ifoff.c#3 (text+ko) ====


==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_lomac/mac_lomac.c#7 (text+ko) ====

@@ -48,6 +48,7 @@
 #include <sys/param.h>
 #include <sys/acl.h>
 #include <sys/conf.h>
+#include <sys/vnode.h>
 #include <sys/extattr.h>
 #include <sys/kernel.h>
 #include <sys/malloc.h>
@@ -60,7 +61,6 @@
 #include <sys/sysproto.h>
 #include <sys/sysent.h>
 #include <sys/systm.h>
-#include <sys/vnode.h>
 #include <sys/file.h>
 #include <sys/socket.h>
 #include <sys/socketvar.h>
@@ -2366,7 +2366,7 @@
 
 static int
 lomac_vnode_check_open(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 	struct mac_lomac *subj, *obj;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_mls/mac_mls.c#7 (text+ko) ====

@@ -48,6 +48,7 @@
 #include <sys/param.h>
 #include <sys/acl.h>
 #include <sys/conf.h>
+#include <sys/vnode.h>
 #include <sys/extattr.h>
 #include <sys/kernel.h>
 #include <sys/ksem.h>
@@ -60,7 +61,6 @@
 #include <sys/sysproto.h>
 #include <sys/sysent.h>
 #include <sys/systm.h>
-#include <sys/vnode.h>
 #include <sys/file.h>
 #include <sys/socket.h>
 #include <sys/socketvar.h>
@@ -2442,7 +2442,7 @@
 
 static int
 mls_vnode_check_open(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 	struct mac_mls *subj, *obj;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_stub/mac_stub.c#5 (text+ko) ====

@@ -50,6 +50,7 @@
 #include <sys/param.h>
 #include <sys/acl.h>
 #include <sys/conf.h>
+#include <sys/vnode.h>
 #include <sys/extattr.h>
 #include <sys/kernel.h>
 #include <sys/ksem.h>
@@ -58,7 +59,6 @@
 #include <sys/systm.h>
 #include <sys/sysproto.h>
 #include <sys/sysent.h>
-#include <sys/vnode.h>
 #include <sys/file.h>
 #include <sys/socket.h>
 #include <sys/socketvar.h>
@@ -985,7 +985,7 @@
 
 static int
 stub_vnode_check_access(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 
 	return (0);
@@ -1300,7 +1300,7 @@
 
 static int
 stub_vnode_check_open(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 
 	return (0);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/security/mac_test/mac_test.c#5 (text+ko) ====

@@ -2242,7 +2242,7 @@
 COUNTER_DECL(vnode_check_access);
 static int
 test_vnode_check_access(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 
 	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
@@ -2416,7 +2416,7 @@
 COUNTER_DECL(vnode_check_open);
 static int
 test_vnode_check_open(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, vaccess_t acc_mode)
 {
 
 	LABEL_CHECK(cred->cr_label, MAGIC_CRED);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/sys/extattr.h#2 (text+ko) ====

@@ -64,7 +64,7 @@
 struct ucred;
 struct vnode;
 int	extattr_check_cred(struct vnode *vp, int attrnamespace,
-	    struct ucred *cred, struct thread *td, int access);
+	    struct ucred *cred, struct thread *td, vaccess_t access);
 
 #else
 #include <sys/cdefs.h>

==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ffs/ffs_vfsops.c#11 (text+ko) ====

@@ -135,7 +135,7 @@
 	struct fs *fs;
 	int error, flags;
 	u_int mntorflags, mntandnotflags;
-	mode_t accessmode;
+	vaccess_t accessmode;
 	struct nameidata ndp;
 	char *fspec;
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ffs/ffs_vnops.c#4 (text+ko) ====

@@ -69,6 +69,7 @@
 #include <sys/systm.h>
 #include <sys/buf.h>
 #include <sys/conf.h>
+#include <sys/vnode.h>
 #include <sys/extattr.h>
 #include <sys/kernel.h>
 #include <sys/limits.h>
@@ -80,7 +81,6 @@
 #include <sys/signalvar.h>
 #include <sys/stat.h>
 #include <sys/vmmeter.h>
-#include <sys/vnode.h>
 
 #include <vm/vm.h>
 #include <vm/vm_extern.h>


More information about the p4-projects mailing list