Small acl patch to return the aclerror that comes back from nfsrv_dissectacl(). This fixes a problem where ATTRNOTSUPP was being returned instead of BADOWNER.

Reviewed by:    rmacklem
Approved by:    zml (mentor)
MFC after:      2 weeks
This commit is contained in:
Zack Kirsch 2011-07-16 08:04:57 +00:00
parent 8e75ad45e6
commit b008a72c86
2 changed files with 3 additions and 3 deletions

View File

@ -660,9 +660,9 @@ nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, int *aclerrp,
aclsize = NFSX_UNSIGNED; aclsize = NFSX_UNSIGNED;
acecnt = fxdr_unsigned(int, *tl); acecnt = fxdr_unsigned(int, *tl);
if (acecnt > ACL_MAX_ENTRIES) if (acecnt > ACL_MAX_ENTRIES)
aceerr = 1; aceerr = NFSERR_ATTRNOTSUPP;
if (nfsrv_useacl == 0) if (nfsrv_useacl == 0)
aceerr = 1; aceerr = NFSERR_ATTRNOTSUPP;
for (i = 0; i < acecnt; i++) { for (i = 0; i < acecnt; i++) {
if (aclp && !aceerr) if (aclp && !aceerr)
error = nfsrv_dissectace(nd, &aclp->acl_entry[i], error = nfsrv_dissectace(nd, &aclp->acl_entry[i],

View File

@ -2304,7 +2304,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, struct nfsvattr *nvap,
if (error) if (error)
goto nfsmout; goto nfsmout;
if (aceerr && !nd->nd_repstat) if (aceerr && !nd->nd_repstat)
nd->nd_repstat = NFSERR_ATTRNOTSUPP; nd->nd_repstat = aceerr;
attrsum += aclsize; attrsum += aclsize;
break; break;
case NFSATTRBIT_ARCHIVE: case NFSATTRBIT_ARCHIVE: