summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs/nfs_commonacl.c
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-12-25 20:44:19 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-12-25 20:44:19 +0000
commit0ccdae7b7da6e583cf244fbb3adddf920a68584b (patch)
tree93356183bb5da1c7bab0662924509ad7da2e215e /sys/fs/nfs/nfs_commonacl.c
parent545cc5fec7115d450d5b76c2f598d1eafb16d592 (diff)
downloadFreeBSD-src-0ccdae7b7da6e583cf244fbb3adddf920a68584b.zip
FreeBSD-src-0ccdae7b7da6e583cf244fbb3adddf920a68584b.tar.gz
Modify the experimental server so that it uses VOP_ACCESSX().
This is necessary in order to enable NFSv4 ACL support. The argument to nfsvno_accchk() was changed to an accmode_t and the function nfsrv_aclaccess() was no longer needed and, therefore, deleted. Reviewed by: trasz MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfs/nfs_commonacl.c')
-rw-r--r--sys/fs/nfs/nfs_commonacl.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/sys/fs/nfs/nfs_commonacl.c b/sys/fs/nfs/nfs_commonacl.c
index d639cfc..910a6a4 100644
--- a/sys/fs/nfs/nfs_commonacl.c
+++ b/sys/fs/nfs/nfs_commonacl.c
@@ -437,70 +437,6 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *aclp, enum vtype type,
}
/*
- * Check access for an NFSv4 acl.
- * The vflags are the basic VREAD, VWRITE, VEXEC. The mask is the NFSV4ACE
- * mask bits for the more detailed check.
- * If the more detailed check fails, due to no acl, do a basic one.
- */
-APPLESTATIC int
-nfsrv_aclaccess(vnode_t vp, accmode_t vflags, u_int32_t mask,
- struct ucred *cred, NFSPROC_T *p)
-{
- int error = 0;
- accmode_t access;
-
- if (nfsrv_useacl == 0) {
- error = VOP_ACCESS(vp, vflags, cred, p);
- return (error);
- }
-
- /* Convert NFSV4ACE mask to vaccess_t */
- access = 0;
- if (mask & NFSV4ACE_READDATA)
- access |= VREAD;
- if (mask & NFSV4ACE_LISTDIRECTORY)
- access |= VREAD;
- if (mask & NFSV4ACE_WRITEDATA)
- access |= VWRITE;
- if (mask & NFSV4ACE_ADDFILE)
- access |= VWRITE;
- if (mask & NFSV4ACE_APPENDDATA)
- access |= VAPPEND;
- if (mask & NFSV4ACE_ADDSUBDIRECTORY)
- access |= VAPPEND;
- if (mask & NFSV4ACE_READNAMEDATTR)
- access |= VREAD_NAMED_ATTRS;
- if (mask & NFSV4ACE_WRITENAMEDATTR)
- access |= VWRITE_NAMED_ATTRS;
- if (mask & NFSV4ACE_EXECUTE)
- access |= VEXEC;
- if (mask & NFSV4ACE_SEARCH)
- access |= VEXEC;
- if (mask & NFSV4ACE_DELETECHILD)
- access |= VDELETE_CHILD;
- if (mask & NFSV4ACE_READATTRIBUTES)
- access |= VREAD_ATTRIBUTES;
- if (mask & NFSV4ACE_WRITEATTRIBUTES)
- access |= VWRITE_ATTRIBUTES;
- if (mask & NFSV4ACE_DELETE)
- access |= VDELETE;
- if (mask & NFSV4ACE_READACL)
- access |= VREAD_ACL;
- if (mask & NFSV4ACE_WRITEACL)
- access |= VWRITE_ACL;
- if (mask & NFSV4ACE_WRITEOWNER)
- access |= VWRITE_OWNER;
- if (mask & NFSV4ACE_SYNCHRONIZE)
- access |= VSYNCHRONIZE;
-
- if (access != 0)
- error = VOP_ACCESS(vp, access, cred, p);
- else
- error = VOP_ACCESS(vp, vflags, cred, p);
- return (error);
-}
-
-/*
* Set an NFSv4 acl.
*/
APPLESTATIC int
OpenPOWER on IntegriCloud