Commit c18f30fe authored by Steve French's avatar Steve French Committed by Steve French

[CIFS] fix ls -l warning on dirs when POSIX ACLs enabled.

Fixed by not returning -ERANCE error on null buffer on QueryACL 
(getxattr for ACLs will null buffer, zero len queries size)

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent 71f53abb
......@@ -1638,17 +1638,17 @@ static int cifs_copy_posix_acl(char * trgt,char * src, const int buflen,const in
}
size = posix_acl_xattr_size(count);
if(size > buflen) {
/* BB should we fill in as much data as we can first? */
/* seems odd that API was not designed so one could query ACL size */
if((buflen == 0) || (local_acl == NULL)) {
/* used to query ACL EA size */
} else if(size > buflen) {
return -ERANGE;
}
} else /* buffer big enough */ {
local_acl->a_version = POSIX_ACL_XATTR_VERSION;
for(i = 0;i < count ;i++) {
cifs_convert_ace(&local_acl->a_entries[i],pACE);
pACE ++;
}
}
return size;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment