The inherited object/container specific CREATOR_OWNER ace should be inserted
before the generic CREATOR_OWNER ace.
This also matches the behavior of a Windows (2008R2) DC
for active directory SDs and also matches the logic for filesystem SDs,
see se_create_child_secdesc().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
}
tmp_acl->aces[tmp_acl->num_aces] = *ace;
desc_expand_generic(tmp_ctx,
- &tmp_acl->aces[tmp_acl->num_aces],
+ &tmp_acl->aces[tmp_acl->num_aces-1],
owner,
group);
- tmp_acl->aces[tmp_acl->num_aces].flags = SEC_ACE_FLAG_INHERITED_ACE;
+ tmp_acl->aces[tmp_acl->num_aces-1].flags = SEC_ACE_FLAG_INHERITED_ACE;
tmp_acl->num_aces++;
}
}