Author: zack
Date: Sat Jul 16 08:04:57 2011
New Revision: 224077
URL: http://svn.freebsd.org/changeset/base/224077

Log:
  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

Modified:
  head/sys/fs/nfs/nfs_commonsubs.c
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonsubs.c    Sat Jul 16 07:12:02 2011        
(r224076)
+++ head/sys/fs/nfs/nfs_commonsubs.c    Sat Jul 16 08:04:57 2011        
(r224077)
@@ -660,9 +660,9 @@ nfsrv_dissectacl(struct nfsrv_descript *
        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],

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c        Sat Jul 16 07:12:02 2011        
(r224076)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c        Sat Jul 16 08:04:57 2011        
(r224077)
@@ -2304,7 +2304,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s
                        if (error)
                                goto nfsmout;
                        if (aceerr && !nd->nd_repstat)
-                               nd->nd_repstat = NFSERR_ATTRNOTSUPP;
+                               nd->nd_repstat = aceerr;
                        attrsum += aclsize;
                        break;
                case NFSATTRBIT_ARCHIVE:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to