summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorzack <zack@FreeBSD.org>2011-07-16 08:04:57 +0000
committerzack <zack@FreeBSD.org>2011-07-16 08:04:57 +0000
commit141efa481c94ebc27dd595c54fc42f22480ff9ce (patch)
tree129d3f6d10204ea7bc6b2cf0004ae518b3b4415c /sys/fs
parent19de2b99a58030fa267a8bb2da9b3292dcf13a66 (diff)
downloadFreeBSD-src-141efa481c94ebc27dd595c54fc42f22480ff9ce.zip
FreeBSD-src-141efa481c94ebc27dd595c54fc42f22480ff9ce.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c4
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 03b5786..2e9eabc0 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -660,9 +660,9 @@ nfsrv_dissectacl(struct nfsrv_descript *nd, NFSACL_T *aclp, int *aclerrp,
aclsize = NFSX_UNSIGNED;
acecnt = fxdr_unsigned(int, *tl);
if (acecnt > ACL_MAX_ENTRIES)
- aceerr = 1;
+ aceerr = NFSERR_ATTRNOTSUPP;
if (nfsrv_useacl == 0)
- aceerr = 1;
+ aceerr = NFSERR_ATTRNOTSUPP;
for (i = 0; i < acecnt; i++) {
if (aclp && !aceerr)
error = nfsrv_dissectace(nd, &aclp->acl_entry[i],
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 5b96729..9a10b5f 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -2304,7 +2304,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, struct nfsvattr *nvap,
if (error)
goto nfsmout;
if (aceerr && !nd->nd_repstat)
- nd->nd_repstat = NFSERR_ATTRNOTSUPP;
+ nd->nd_repstat = aceerr;
attrsum += aclsize;
break;
case NFSATTRBIT_ARCHIVE:
OpenPOWER on IntegriCloud