diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2011-04-14 23:46:15 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2011-04-14 23:46:15 +0000 |
commit | a09001a82bf23d653e30a27e6752839f151f337d (patch) | |
tree | e5f9c4eded45dce4197320c137ba3aaab730b04e /sys/fs/nfsserver/nfs_nfsdport.c | |
parent | 4a8fa6fe5827798941ee3e8f8da215bcca0585f6 (diff) | |
download | src-a09001a82bf23d653e30a27e6752839f151f337d.tar.gz src-a09001a82bf23d653e30a27e6752839f151f337d.zip |
Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
to determine if a file system supports NFSv4 ACLs. Since
VOP_PATHCONF() must be called with a locked vnode, the function
is called before nfsvno_fillattr() and the result is passed in
as an extra argument.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=220648
Diffstat (limited to 'sys/fs/nfsserver/nfs_nfsdport.c')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index b3dea700ece9..90e7d4ffe0ce 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -1396,13 +1396,14 @@ nfsvno_updfilerev(struct vnode *vp, struct nfsvattr *nvap, int nfsvno_fillattr(struct nfsrv_descript *nd, struct mount *mp, struct vnode *vp, struct nfsvattr *nvap, fhandle_t *fhp, int rderror, nfsattrbit_t *attrbitp, - struct ucred *cred, struct thread *p, int isdgram, int reterr, int at_root, - uint64_t mounted_on_fileno) + struct ucred *cred, struct thread *p, int isdgram, int reterr, + int supports_nfsv4acls, int at_root, uint64_t mounted_on_fileno) { int error; error = nfsv4_fillattr(nd, mp, vp, NULL, &nvap->na_vattr, fhp, rderror, - attrbitp, cred, p, isdgram, reterr, at_root, mounted_on_fileno); + attrbitp, cred, p, isdgram, reterr, supports_nfsv4acls, at_root, + mounted_on_fileno); return (error); } @@ -1692,7 +1693,7 @@ nfsrvd_readdirplus(struct nfsrv_descript *nd, int isdgram, struct uio io; struct iovec iv; struct componentname cn; - int at_root, needs_unbusy, not_zfs; + int at_root, needs_unbusy, not_zfs, supports_nfsv4acls; struct mount *mp, *new_mp; uint64_t mounted_on_fileno; @@ -2061,8 +2062,12 @@ again: *tl++ = 0; *tl = txdr_unsigned(*cookiep); dirlen += nfsm_strtom(nd, dp->d_name, nlen); - if (nvp != NULL) + if (nvp != NULL) { + supports_nfsv4acls = + nfs_supportsnfsv4acls(nvp); VOP_UNLOCK(nvp, 0); + } else + supports_nfsv4acls = 0; if (refp != NULL) { dirlen += nfsrv_putreferralattr(nd, &savbits, refp, 0, @@ -2077,12 +2082,14 @@ again: } else if (r) { dirlen += nfsvno_fillattr(nd, new_mp, nvp, nvap, &nfh, r, &rderrbits, - nd->nd_cred, p, isdgram, 0, at_root, + nd->nd_cred, p, isdgram, 0, + supports_nfsv4acls, at_root, mounted_on_fileno); } else { dirlen += nfsvno_fillattr(nd, new_mp, nvp, nvap, &nfh, r, &attrbits, - nd->nd_cred, p, isdgram, 0, at_root, + nd->nd_cred, p, isdgram, 0, + supports_nfsv4acls, at_root, mounted_on_fileno); } if (nvp != NULL) |