aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nfs')
-rw-r--r--sys/fs/nfs/nfs_commonacl.c2
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c51
-rw-r--r--sys/fs/nfs/nfs_var.h10
3 files changed, 28 insertions, 35 deletions
diff --git a/sys/fs/nfs/nfs_commonacl.c b/sys/fs/nfs/nfs_commonacl.c
index 2120b095823b..64272b35a82d 100644
--- a/sys/fs/nfs/nfs_commonacl.c
+++ b/sys/fs/nfs/nfs_commonacl.c
@@ -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;
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 2b0ce45d05dd..950288027d76 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -1148,12 +1148,11 @@ nfsmout:
*/
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:
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index fe2462d94fd5..0211acf7f00b 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -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 *);