diff options
author | trasz <trasz@FreeBSD.org> | 2008-10-28 13:44:11 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2008-10-28 13:44:11 +0000 |
commit | 0ad8692247694171bf2d3f963f24b15f5223a0de (patch) | |
tree | cb5d9bbe34cd6eae2c3dd212bdfdfd85569424dd /sys/nfsserver | |
parent | bc6713490924420312442a3f3fc4ef1fe4b8e400 (diff) | |
download | FreeBSD-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/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index a339e55..9eb8695 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -138,7 +138,8 @@ struct nfsrvstats nfsrvstats; SYSCTL_STRUCT(_vfs_nfsrv, NFS_NFSRVSTATS, nfsrvstats, CTLFLAG_RW, &nfsrvstats, nfsrvstats, "S,nfsrvstats"); -static int nfsrv_access(struct vnode *, int, struct ucred *, int, int); +static int nfsrv_access(struct vnode *, accmode_t, struct ucred *, + int, int); static void nfsrvw_coalesce(struct nfsrv_descript *, struct nfsrv_descript *); @@ -4234,8 +4235,8 @@ nfsmout: * will return EPERM instead of EACCESS. EPERM is always an error. */ static int -nfsrv_access(struct vnode *vp, int flags, struct ucred *cred, int rdonly, - int override) +nfsrv_access(struct vnode *vp, accmode_t accmode, struct ucred *cred, + int rdonly, int override) { struct vattr vattr; int error; @@ -4244,7 +4245,7 @@ nfsrv_access(struct vnode *vp, int flags, struct ucred *cred, int rdonly, nfsdbprintf(("%s %d\n", __FILE__, __LINE__)); - if (flags & VWRITE) { + if (accmode & VWRITE) { /* Just vn_writechk() changed to check rdonly */ /* * Disallow write attempts on read-only filesystems; @@ -4272,7 +4273,7 @@ nfsrv_access(struct vnode *vp, int flags, struct ucred *cred, int rdonly, error = VOP_GETATTR(vp, &vattr, cred); if (error) return (error); - error = VOP_ACCESS(vp, flags, cred, curthread); + error = VOP_ACCESS(vp, accmode, cred, curthread); /* * Allow certain operations for the owner (reads and writes * on files that are already open). |