nfs: Add some support for POSIX draft ACLs
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.
This is the fifth of several patches that implement the
above draft.
This one mostly adds an extra argument to two functions
in nfscommon.ko. Unfortunately, these functions are
called in many places, so the changes are numerous, but
straightforward.
Since the internal KAPI between the NFS modules is changed
by this commit, all of nfscommon.ko, nfscl.ko and nfsd.ko
must be rebuilt from sources.
There should be no semantics change for the series at
this point.
Fixes: a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
This commit is contained in:
@@ -40,7 +40,7 @@ static int nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner,
|
||||
*/
|
||||
int
|
||||
nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep,
|
||||
bool server, int *aceerrp, int *acesizep, NFSPROC_T *p)
|
||||
bool server, int *aceerrp, int *acesizep)
|
||||
{
|
||||
u_int32_t *tl;
|
||||
int len, gotid = 0, owner = 0, error = 0, aceerr = 0;
|
||||
|
||||
+22
-29
@@ -1148,12 +1148,11 @@ nfsm_getfh(struct nfsrv_descript *nd, struct nfsfh **nfhpp)
|
||||
*/
|
||||
int
|
||||
nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, bool server,
|
||||
int *aclerrp, int *aclsizep, __unused NFSPROC_T *p)
|
||||
bool posixacl, int *aclerrp, int *aclsizep)
|
||||
{
|
||||
uint32_t *tl;
|
||||
int i, aclsize;
|
||||
int acecnt, error = 0, aceerr = 0, acesize;
|
||||
bool posixacl = false;
|
||||
|
||||
*aclerrp = 0;
|
||||
if (aclp != NULL)
|
||||
@@ -1186,7 +1185,7 @@ nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, bool server,
|
||||
else
|
||||
error = nfsrv_dissectace(nd,
|
||||
&aclp->acl_entry[i], server, &aceerr,
|
||||
&acesize, p);
|
||||
&acesize);
|
||||
} else if (posixacl)
|
||||
error = nfsrv_skipace(nd, ACL_TYPE_ACCESS, &acesize);
|
||||
else
|
||||
@@ -1328,7 +1327,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
struct nfsv3_pathconf *pc, struct statfs *sbp, struct nfsstatfs *sfp,
|
||||
struct nfsfsinfo *fsp, NFSACL_T *aclp, int compare, int *retcmpp,
|
||||
u_int32_t *leasep, u_int32_t *rderrp, bool *has_namedattrp,
|
||||
uint32_t *clone_blksizep, NFSPROC_T *p, struct ucred *cred)
|
||||
uint32_t *clone_blksizep, uint32_t *trueformp, NFSPROC_T *p,
|
||||
struct ucred *cred)
|
||||
{
|
||||
u_int32_t *tl;
|
||||
int i = 0, j, k, l = 0, m, bitpos, attrsum = 0;
|
||||
@@ -1648,8 +1648,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
NFSACL_T *naclp;
|
||||
|
||||
naclp = acl_alloc(M_WAITOK);
|
||||
error = nfsrv_dissectacl(nd, naclp, true,
|
||||
&aceerr, &cnt, p);
|
||||
error = nfsrv_dissectacl(nd, naclp, true, false,
|
||||
&aceerr, &cnt);
|
||||
if (error) {
|
||||
acl_free(naclp);
|
||||
goto nfsmout;
|
||||
@@ -1659,8 +1659,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
*retcmpp = NFSERR_NOTSAME;
|
||||
acl_free(naclp);
|
||||
} else {
|
||||
error = nfsrv_dissectacl(nd, NULL, true,
|
||||
&aceerr, &cnt, p);
|
||||
error = nfsrv_dissectacl(nd, NULL, true, false,
|
||||
&aceerr, &cnt);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
*retcmpp = NFSERR_ATTRNOTSUPP;
|
||||
@@ -1669,14 +1669,13 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
} else {
|
||||
if (vp != NULL && aclp != NULL)
|
||||
error = nfsrv_dissectacl(nd, aclp, false,
|
||||
&aceerr, &cnt, p);
|
||||
false, &aceerr, &cnt);
|
||||
else
|
||||
error = nfsrv_dissectacl(nd, NULL, false,
|
||||
&aceerr, &cnt, p);
|
||||
false, &aceerr, &cnt);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
}
|
||||
|
||||
attrsum += cnt;
|
||||
break;
|
||||
case NFSATTRBIT_ACLSUPPORT:
|
||||
@@ -2470,13 +2469,9 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
*tl))
|
||||
*retcmpp = NFSERR_NOTSAME;
|
||||
}
|
||||
#ifdef notyet
|
||||
} else if (trueformp != NULL) {
|
||||
*trueformp = fxdr_unsigned(uint32_t, *tl);
|
||||
}
|
||||
#else
|
||||
}
|
||||
#endif
|
||||
attrsum += NFSX_UNSIGNED;
|
||||
break;
|
||||
case NFSATTRBIT_ACLTRUEFORMSCOPE:
|
||||
@@ -2497,8 +2492,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
NFSACL_T *naclp;
|
||||
|
||||
naclp = acl_alloc(M_WAITOK);
|
||||
error = nfsrv_dissectacl(nd, naclp, true,
|
||||
&aceerr, &cnt, p);
|
||||
error = nfsrv_dissectacl(nd, naclp, true, true,
|
||||
&aceerr, &cnt);
|
||||
if (error) {
|
||||
acl_free(naclp);
|
||||
goto nfsmout;
|
||||
@@ -2508,8 +2503,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
*retcmpp = NFSERR_NOTSAME;
|
||||
acl_free(naclp);
|
||||
} else {
|
||||
error = nfsrv_dissectacl(nd, NULL, true,
|
||||
&aceerr, &cnt, p);
|
||||
error = nfsrv_dissectacl(nd, NULL, true, true,
|
||||
&aceerr, &cnt);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
*retcmpp = NFSERR_ATTRNOTSUPP;
|
||||
@@ -2518,14 +2513,13 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
} else {
|
||||
if (vp != NULL && aclp != NULL)
|
||||
error = nfsrv_dissectacl(nd, aclp, false,
|
||||
&aceerr, &cnt, p);
|
||||
true, &aceerr, &cnt);
|
||||
else
|
||||
error = nfsrv_dissectacl(nd, NULL, false,
|
||||
&aceerr, &cnt, p);
|
||||
true, &aceerr, &cnt);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
}
|
||||
|
||||
attrsum += cnt;
|
||||
break;
|
||||
case NFSATTRBIT_POSIXDEFAULTACL:
|
||||
@@ -2535,8 +2529,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
NFSACL_T *naclp;
|
||||
|
||||
naclp = acl_alloc(M_WAITOK);
|
||||
error = nfsrv_dissectacl(nd, naclp, true,
|
||||
&aceerr, &cnt, p);
|
||||
error = nfsrv_dissectacl(nd, naclp, true, true,
|
||||
&aceerr, &cnt);
|
||||
if (error) {
|
||||
acl_free(naclp);
|
||||
goto nfsmout;
|
||||
@@ -2546,8 +2540,8 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
*retcmpp = NFSERR_NOTSAME;
|
||||
acl_free(naclp);
|
||||
} else {
|
||||
error = nfsrv_dissectacl(nd, NULL, true,
|
||||
&aceerr, &cnt, p);
|
||||
error = nfsrv_dissectacl(nd, NULL, true, true,
|
||||
&aceerr, &cnt);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
*retcmpp = NFSERR_ATTRNOTSUPP;
|
||||
@@ -2556,14 +2550,13 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
|
||||
} else {
|
||||
if (vp != NULL && aclp != NULL)
|
||||
error = nfsrv_dissectacl(nd, aclp, false,
|
||||
&aceerr, &cnt, p);
|
||||
true, &aceerr, &cnt);
|
||||
else
|
||||
error = nfsrv_dissectacl(nd, NULL, false,
|
||||
&aceerr, &cnt, p);
|
||||
true, &aceerr, &cnt);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
}
|
||||
|
||||
attrsum += cnt;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -334,8 +334,8 @@ int nfsm_advance(struct nfsrv_descript *, int, int);
|
||||
void *nfsm_dissct(struct nfsrv_descript *, int, int);
|
||||
void newnfs_copycred(struct nfscred *, struct ucred *);
|
||||
void newnfs_copyincred(struct ucred *, struct nfscred *);
|
||||
int nfsrv_dissectacl(struct nfsrv_descript *, NFSACL_T *, bool, int *,
|
||||
int *, NFSPROC_T *);
|
||||
int nfsrv_dissectacl(struct nfsrv_descript *, NFSACL_T *, bool, bool, int *,
|
||||
int *);
|
||||
int nfsrv_getattrbits(struct nfsrv_descript *, nfsattrbit_t *, int *,
|
||||
int *);
|
||||
int nfsrv_getopbits(struct nfsrv_descript *, nfsopbit_t *, int *);
|
||||
@@ -343,8 +343,8 @@ int nfsv4_loadattr(struct nfsrv_descript *, vnode_t,
|
||||
struct nfsvattr *, struct nfsfh **, fhandle_t *, int,
|
||||
struct nfsv3_pathconf *, struct statfs *, struct nfsstatfs *,
|
||||
struct nfsfsinfo *, NFSACL_T *,
|
||||
int, int *, u_int32_t *, u_int32_t *, bool *, uint32_t *, NFSPROC_T *,
|
||||
struct ucred *);
|
||||
int, int *, u_int32_t *, u_int32_t *, bool *, uint32_t *, uint32_t *,
|
||||
NFSPROC_T *, struct ucred *);
|
||||
int nfsv4_lock(struct nfsv4lock *, int, int *, struct mtx *, struct mount *);
|
||||
void nfsv4_unlock(struct nfsv4lock *, int);
|
||||
void nfsv4_relref(struct nfsv4lock *);
|
||||
@@ -441,7 +441,7 @@ int nfs_supportsposixacls(struct vnode *);
|
||||
|
||||
/* nfs_commonacl.c */
|
||||
int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *,
|
||||
bool, int *, int *, NFSPROC_T *);
|
||||
bool, int *, int *);
|
||||
uint32_t nfs_aceperm(acl_perm_t);
|
||||
int nfsrv_dissectposixace(struct nfsrv_descript *, struct acl_entry *,
|
||||
bool, int *, int *);
|
||||
|
||||
@@ -272,7 +272,7 @@ nfsm_loadattr(struct nfsrv_descript *nd, struct nfsvattr *nap)
|
||||
if (nd->nd_flag & ND_NFSV4) {
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL,
|
||||
NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL);
|
||||
NULL, NULL, NULL);
|
||||
} else if (nd->nd_flag & ND_NFSV3) {
|
||||
NFSM_DISSECT(fp, struct nfs_fattr *, NFSX_V3FATTR);
|
||||
nap->na_type = nfsv34tov_type(fp->fa_type);
|
||||
|
||||
@@ -828,7 +828,7 @@ nfscl_wcc_data(struct nfsrv_descript *nd, struct vnode *vp,
|
||||
== (ND_NFSV4 | ND_V4WCCATTR)) {
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
/*
|
||||
|
||||
@@ -678,7 +678,7 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
|
||||
if (ret)
|
||||
ndp->nfsdl_flags |= NFSCLDL_RECALL;
|
||||
error = nfsrv_dissectace(nd, &ndp->nfsdl_ace, false,
|
||||
&ret, &acesize, p);
|
||||
&ret, &acesize);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
} else if (deleg == NFSV4OPEN_DELEGATENONEEXT &&
|
||||
@@ -699,7 +699,7 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
|
||||
("nfsrpc_openrpc: Getattr repstat"));
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, p, cred);
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, p, cred);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
}
|
||||
@@ -1358,7 +1358,7 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred,
|
||||
if ((nd->nd_flag & ND_NFSV4) != 0)
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, 0, NULL, leasep, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
else
|
||||
error = nfsm_loadattr(nd, nap);
|
||||
} else
|
||||
@@ -2754,7 +2754,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap,
|
||||
if (ret)
|
||||
dp->nfsdl_flags |= NFSCLDL_RECALL;
|
||||
error = nfsrv_dissectace(nd, &dp->nfsdl_ace, false,
|
||||
&ret, &acesize, p);
|
||||
&ret, &acesize);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
} else if (deleg == NFSV4OPEN_DELEGATENONEEXT &&
|
||||
@@ -3601,7 +3601,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
nfsva.na_mntonfileno = UINT64_MAX;
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, p, cred);
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
p, cred);
|
||||
if (error) {
|
||||
dotdotfileid = dotfileid;
|
||||
} else if (gotmnton) {
|
||||
@@ -3851,7 +3852,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
nfsva.na_mntonfileno = UINT64_MAX;
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, &rderr, NULL, NULL, p, cred);
|
||||
NULL, NULL, &rderr, NULL, NULL, NULL,
|
||||
p, cred);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
|
||||
@@ -4076,7 +4078,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
nfsva.na_mntonfileno = UINT64_MAX;
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, p, cred);
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
p, cred);
|
||||
if (error) {
|
||||
dotdotfileid = dotfileid;
|
||||
} else if (gotmnton) {
|
||||
@@ -4353,7 +4356,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
nfsva.na_mntonfileno = 0xffffffff;
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, &nfhp,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, &rderr, NULL, NULL, p, cred);
|
||||
NULL, NULL, &rderr, NULL, NULL, NULL,
|
||||
p, cred);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
}
|
||||
@@ -5018,7 +5022,7 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp,
|
||||
if (nd->nd_repstat == 0) {
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0,
|
||||
NULL, NULL, sbp, fsp, NULL, 0, NULL, leasep, NULL,
|
||||
NULL, cloneblksizep, p, cred);
|
||||
NULL, cloneblksizep, NULL, p, cred);
|
||||
if (!error) {
|
||||
nmp->nm_fsid[0] = nap->na_filesid[0];
|
||||
nmp->nm_fsid[1] = nap->na_filesid[1];
|
||||
@@ -5113,7 +5117,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, bool *has_namedattrp,
|
||||
if (nd->nd_repstat == 0) {
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0,
|
||||
pc, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL,
|
||||
has_namedattrp, clone_blksizep, p, cred);
|
||||
has_namedattrp, clone_blksizep, trueformp, p, cred);
|
||||
if (!error)
|
||||
*attrflagp = 1;
|
||||
} else {
|
||||
@@ -5430,7 +5434,7 @@ nfsrpc_getacl(struct vnode *vp, acl_type_t acltype, struct ucred *cred,
|
||||
if (!nd->nd_repstat)
|
||||
error = nfsv4_loadattr(nd, vp, NULL, NULL, NULL, 0, NULL,
|
||||
NULL, NULL, NULL, aclp, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
p, cred);
|
||||
NULL, p, cred);
|
||||
else
|
||||
error = nd->nd_repstat;
|
||||
m_freem(nd->nd_mrep);
|
||||
@@ -8532,7 +8536,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp,
|
||||
if (ret != 0)
|
||||
ndp->nfsdl_flags |= NFSCLDL_RECALL;
|
||||
error = nfsrv_dissectace(nd, &ndp->nfsdl_ace, false,
|
||||
&ret, &acesize, p);
|
||||
&ret, &acesize);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
} else if (deleg == NFSV4OPEN_DELEGATENONEEXT &&
|
||||
@@ -8556,7 +8560,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp,
|
||||
if (*++tl == 0) {
|
||||
error = nfsv4_loadattr(nd, NULL, &nfsva, NULL,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, p, cred);
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, p, cred);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
if (ndp != NULL) {
|
||||
@@ -8759,7 +8763,7 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap,
|
||||
if (ret != 0)
|
||||
dp->nfsdl_flags |= NFSCLDL_RECALL;
|
||||
error = nfsrv_dissectace(nd, &dp->nfsdl_ace, false,
|
||||
&ret, &acesize, p);
|
||||
&ret, &acesize);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
} else if (deleg == NFSV4OPEN_DELEGATENONEEXT &&
|
||||
|
||||
@@ -3228,8 +3228,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap,
|
||||
attrsum += NFSX_HYPER;
|
||||
break;
|
||||
case NFSATTRBIT_ACL:
|
||||
error = nfsrv_dissectacl(nd, aclp, true, &aceerr,
|
||||
&aclsize, p);
|
||||
error = nfsrv_dissectacl(nd, aclp, true, false, &aceerr,
|
||||
&aclsize);
|
||||
if (error)
|
||||
goto nfsmout;
|
||||
if (aceerr && !nd->nd_repstat)
|
||||
@@ -3421,8 +3421,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap,
|
||||
attrsum += 2 * NFSX_UNSIGNED;
|
||||
break;
|
||||
case NFSATTRBIT_POSIXACCESSACL:
|
||||
error = nfsrv_dissectacl(nd, aclp, true, &aceerr,
|
||||
&aclsize, p);
|
||||
error = nfsrv_dissectacl(nd, aclp, true, true, &aceerr,
|
||||
&aclsize);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
if (!nd->nd_repstat) {
|
||||
@@ -3436,8 +3436,8 @@ nfsv4_sattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsvattr *nvap,
|
||||
attrsum += aclsize;
|
||||
break;
|
||||
case NFSATTRBIT_POSIXDEFAULTACL:
|
||||
error = nfsrv_dissectacl(nd, daclp, true, &aceerr,
|
||||
&aclsize, p);
|
||||
error = nfsrv_dissectacl(nd, daclp, true, true, &aceerr,
|
||||
&aclsize);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
if (!nd->nd_repstat) {
|
||||
@@ -5746,7 +5746,7 @@ nfsrv_writedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off, int len,
|
||||
(ND_NFSV4 | ND_V4WCCATTR)) {
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL,
|
||||
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
NFSD_DEBUG(4, "nfsrv_writedsdorpc: wcc attr=%d\n", error);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
@@ -5778,7 +5778,7 @@ nfsrv_writedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off, int len,
|
||||
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED);
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL,
|
||||
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
}
|
||||
NFSD_DEBUG(4, "nfsrv_writedsdorpc: aft loadattr=%d\n", error);
|
||||
nfsmout:
|
||||
@@ -5945,7 +5945,7 @@ nfsrv_allocatedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off,
|
||||
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED);
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL,
|
||||
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
} else
|
||||
error = nd->nd_repstat;
|
||||
NFSD_DEBUG(4, "nfsrv_allocatedsdorpc: aft loadattr=%d\n", error);
|
||||
@@ -6113,7 +6113,7 @@ nfsrv_deallocatedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off,
|
||||
(ND_NFSV4 | ND_V4WCCATTR)) {
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL,
|
||||
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
NFSD_DEBUG(4, "nfsrv_deallocatedsdorpc: wcc attr=%d\n", error);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
@@ -6128,7 +6128,7 @@ nfsrv_deallocatedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off,
|
||||
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED);
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL,
|
||||
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL);
|
||||
NULL, NULL);
|
||||
} else
|
||||
error = nd->nd_repstat;
|
||||
NFSD_DEBUG(4, "nfsrv_deallocatedsdorpc: aft loadattr=%d\n", error);
|
||||
@@ -6277,7 +6277,7 @@ nfsrv_setattrdsdorpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
|
||||
(ND_NFSV4 | ND_V4WCCATTR)) {
|
||||
error = nfsv4_loadattr(nd, NULL, dsnap, NULL, NULL, 0, NULL,
|
||||
NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL);
|
||||
NULL, NULL, NULL);
|
||||
NFSD_DEBUG(4, "nfsrv_setattrdsdorpc: wcc attr=%d\n", error);
|
||||
if (error != 0)
|
||||
goto nfsmout;
|
||||
@@ -6302,7 +6302,7 @@ nfsrv_setattrdsdorpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
|
||||
NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED);
|
||||
error = nfsv4_loadattr(nd, NULL, dsnap, NULL, NULL, 0, NULL,
|
||||
NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL);
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
NFSD_DEBUG(4, "nfsrv_setattrdsdorpc: aft setattr loadattr=%d\n", error);
|
||||
nfsmout:
|
||||
@@ -6591,7 +6591,7 @@ nfsrv_getattrdsrpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
|
||||
if (nd->nd_repstat == 0) {
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL);
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
/*
|
||||
* We can only save the updated values in the extended
|
||||
* attribute if the vp is exclusively locked.
|
||||
|
||||
@@ -4410,8 +4410,8 @@ nfsrvd_verify(struct nfsrv_descript *nd, int isdgram,
|
||||
if (!nd->nd_repstat) {
|
||||
nfsvno_getfs(&fs, isdgram);
|
||||
error = nfsv4_loadattr(nd, vp, &nva, NULL, &fh, fhsize, NULL,
|
||||
sf, NULL, &fs, NULL, 1, &ret, NULL, NULL, NULL, NULL, p,
|
||||
nd->nd_cred);
|
||||
sf, NULL, &fs, NULL, 1, &ret, NULL, NULL, NULL, NULL, NULL,
|
||||
p, nd->nd_cred);
|
||||
if (!error) {
|
||||
if (nd->nd_procnum == NFSV4OP_NVERIFY) {
|
||||
if (ret == 0)
|
||||
|
||||
@@ -4689,7 +4689,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp,
|
||||
} else if (error == 0 && procnum == NFSV4OP_CBGETATTR)
|
||||
error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL,
|
||||
NULL, NULL, p, NULL);
|
||||
NULL, NULL, NULL, p, NULL);
|
||||
m_freem(nd->nd_mrep);
|
||||
}
|
||||
NFSLOCKSTATE();
|
||||
|
||||
Reference in New Issue
Block a user