summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2008-10-28 13:44:11 +0000
committertrasz <trasz@FreeBSD.org>2008-10-28 13:44:11 +0000
commit0ad8692247694171bf2d3f963f24b15f5223a0de (patch)
treecb5d9bbe34cd6eae2c3dd212bdfdfd85569424dd /sys/nfs4client
parentbc6713490924420312442a3f3fc4ef1fe4b8e400 (diff)
downloadFreeBSD-src-0ad8692247694171bf2d3f963f24b15f5223a0de.zip
FreeBSD-src-0ad8692247694171bf2d3f963f24b15f5223a0de.tar.gz
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary
to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit. Approved by: rwatson (mentor)
Diffstat (limited to 'sys/nfs4client')
-rw-r--r--sys/nfs4client/nfs4_vnops.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c
index 9a28da3..4dd7316 100644
--- a/sys/nfs4client/nfs4_vnops.c
+++ b/sys/nfs4client/nfs4_vnops.c
@@ -301,7 +301,7 @@ nfs4_access(struct vop_access_args *ap)
* unless the file is a socket, fifo, or a block or character
* device resident on the filesystem.
*/
- if ((ap->a_mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
+ if ((ap->a_accmode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
switch (vp->v_type) {
case VREG:
case VDIR:
@@ -321,20 +321,20 @@ nfs4_access(struct vop_access_args *ap)
*/
/* XXX Disable this for now; needs fixing of _access_otw() */
if (0 && v3) {
- if (ap->a_mode & VREAD)
+ if (ap->a_accmode & VREAD)
mode = NFSV3ACCESS_READ;
else
mode = 0;
if (vp->v_type != VDIR) {
- if (ap->a_mode & VWRITE)
+ if (ap->a_accmode & VWRITE)
mode |= (NFSV3ACCESS_MODIFY | NFSV3ACCESS_EXTEND);
- if (ap->a_mode & VEXEC)
+ if (ap->a_accmode & VEXEC)
mode |= NFSV3ACCESS_EXECUTE;
} else {
- if (ap->a_mode & VWRITE)
+ if (ap->a_accmode & VWRITE)
mode |= (NFSV3ACCESS_MODIFY | NFSV3ACCESS_EXTEND |
NFSV3ACCESS_DELETE);
- if (ap->a_mode & VEXEC)
+ if (ap->a_accmode & VEXEC)
mode |= NFSV3ACCESS_LOOKUP;
}
/* XXX safety belt, only make blanket request if caching */
@@ -370,16 +370,16 @@ nfs4_access(struct vop_access_args *ap)
}
/* XXX use generic access code here? */
- mode = ap->a_mode & VREAD ? NFSV4ACCESS_READ : 0;
+ mode = ap->a_accmode & VREAD ? NFSV4ACCESS_READ : 0;
if (vp->v_type == VDIR) {
- if (ap->a_mode & VWRITE)
+ if (ap->a_accmode & VWRITE)
mode |= NFSV4ACCESS_MODIFY | NFSV4ACCESS_EXTEND | NFSV4ACCESS_DELETE;
- if (ap->a_mode & VEXEC)
+ if (ap->a_accmode & VEXEC)
mode |= NFSV4ACCESS_LOOKUP;
} else {
- if (ap->a_mode & VWRITE)
+ if (ap->a_accmode & VWRITE)
mode |= NFSV4ACCESS_MODIFY | NFSV4ACCESS_EXTEND;
- if (ap->a_mode & VEXEC)
+ if (ap->a_accmode & VEXEC)
mode |= NFSV4ACCESS_EXECUTE;
}
OpenPOWER on IntegriCloud