Revert "TODO breaks tests libcli/security: fix the CREATOR_OWNER order in calculate_i...
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Jun 2016 19:55:47 +0000 (21:55 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 27 Jun 2016 19:55:47 +0000 (21:55 +0200)
This reverts commit 80b127c13a0592f8f1569c1cf8f356f292971fd6.

libcli/security/create_descriptor.c

index 037dd0a776ae703e84452d6f7b3a619d5582a5a2..03c0658485eb1356124a5fffc3d3e0f14ad3b9b4 100644 (file)
@@ -215,10 +215,10 @@ static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX *mem_ctx,
                                                    return NULL;
                                            }
                                            tmp_acl->aces[tmp_acl->num_aces] = *ace;
-                                           desc_expand_generic(&tmp_acl->aces[tmp_acl->num_aces-1],
+                                           desc_expand_generic(&tmp_acl->aces[tmp_acl->num_aces],
                                                                owner,
                                                                group);
-                                           tmp_acl->aces[tmp_acl->num_aces-1].flags = SEC_ACE_FLAG_INHERITED_ACE;
+                                           tmp_acl->aces[tmp_acl->num_aces].flags = SEC_ACE_FLAG_INHERITED_ACE;
                                            tmp_acl->num_aces++;
                                }
                        }