]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
If we didn't inherit any ACE's the ACE pointer should be NULL.
authorJeremy Allison <jra@samba.org>
Fri, 7 Nov 2008 07:29:20 +0000 (23:29 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 7 Nov 2008 07:29:20 +0000 (23:29 -0800)
Jeremy.

source3/lib/secdesc.c

index 94d249564f8b491d0152bcb7b17e29c2c46df569..de547d815fc5343728dd8df48e6793fa4f8d4875 100644 (file)
@@ -563,15 +563,17 @@ NTSTATUS se_create_child_secdesc(TALLOC_CTX *ctx,
        }
 
        /* Create child security descriptor to return */
-
-       new_dacl = make_sec_acl(ctx,
+       if (new_ace_list_ndx) {
+               new_dacl = make_sec_acl(ctx,
                                NT4_ACL_REVISION,
                                new_ace_list_ndx,
                                new_ace_list);
 
-       if (!new_dacl) {
-               return NT_STATUS_NO_MEMORY;
+               if (!new_dacl) {
+                       return NT_STATUS_NO_MEMORY;
+               }
        }
+
        *ppsd = make_sec_desc(ctx,
                        SECURITY_DESCRIPTOR_REVISION_1,
                        SEC_DESC_SELF_RELATIVE|SEC_DESC_DACL_PRESENT,