summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Werth <alexander.werth@de.ibm.com>2013-08-22 15:01:17 +0200
committerDavid Disseldorp <ddiss@samba.org>2013-10-30 20:31:42 +0100
commit508b86e6eff056a780c27b7dbb402d4d0a29ec3b (patch)
treedc70a07ebdccbd2e3ef1e30601445c495079c832
parenta6bc2fd0d1df3746d7ae3d987765b346feee2bd8 (diff)
downloadsamba-508b86e6eff056a780c27b7dbb402d4d0a29ec3b.tar.gz
samba-508b86e6eff056a780c27b7dbb402d4d0a29ec3b.tar.xz
samba-508b86e6eff056a780c27b7dbb402d4d0a29ec3b.zip
s3:modules: nfs4_acls ACLs with zero entries are fine.
Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Oct 30 20:31:42 CET 2013 on sn-devel-104
-rw-r--r--source3/modules/nfs4_acls.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 1366ba15c3..08ae141158 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -328,8 +328,8 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx,
DEBUG(10, ("smbacl_nfs42win entered\n"));
aclint = get_validated_aclint(theacl);
- /* We do not check for naces being 0 or theacl being NULL here
- because it is done upstream in smb_get_nt_acl_nfs4().
+ /* We do not check for theacl being NULL here
+ because this is already checked in smb_get_nt_acl_nfs4().
We reserve twice the number of input aces because one nfs4
ace might result in 2 nt aces.*/
nt_ace_list = (struct security_ace *)TALLOC_ZERO_SIZE(
@@ -503,11 +503,11 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
struct security_acl *psa = NULL;
TALLOC_CTX *frame = talloc_stackframe();
- if (theacl==NULL || smb_get_naces(theacl)==0) {
+ if (theacl==NULL) {
TALLOC_FREE(frame);
return NT_STATUS_ACCESS_DENIED; /* special because we
- * shouldn't alloc 0 for
- * win */
+ * need to think through
+ * the null case.*/
}
uid_to_sid(&sid_owner, sbuf->st_ex_uid);
@@ -515,7 +515,7 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
if (smbacl4_nfs42win(mem_ctx, params, theacl, &sid_owner, &sid_group,
S_ISDIR(sbuf->st_ex_mode),
- &nt_ace_list, &good_aces)==false) {
+ &nt_ace_list, &good_aces)==false) {
DEBUG(8,("smbacl4_nfs42win failed\n"));
TALLOC_FREE(frame);
return map_nt_error_from_unix(errno);