diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/groupdb/mapping.c | 8 | ||||
-rw-r--r-- | source3/passdb/util_sam_sid.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index bd387ee319..48bdfe2cd2 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -575,7 +575,7 @@ static NTSTATUS enum_aliasmem(const DOM_SID *alias, DOM_SID **sids, int *num) if (!string_to_sid(&sid, string_sid)) continue; - add_sid_to_array(sid, sids, num); + add_sid_to_array(&sid, sids, num); if (sids == NULL) return NT_STATUS_NO_MEMORY; @@ -694,7 +694,7 @@ static NTSTATUS alias_memberships(const DOM_SID *sid, DOM_SID **sids, int *num) if (is_foreign_alias_member(sid, &maps[i].sid)) { - add_sid_to_array(maps[i].sid, sids, num); + add_sid_to_array(&maps[i].sid, sids, num); if (sids == NULL) { SAFE_FREE(maps); @@ -710,7 +710,7 @@ static NTSTATUS alias_memberships(const DOM_SID *sid, DOM_SID **sids, int *num) for (i=0; i<num_maps; i++) { if (is_foreign_alias_member(sid, &maps[i].sid)) { - add_sid_to_array(maps[i].sid, sids, num); + add_sid_to_array(&maps[i].sid, sids, num); if (sids == NULL) { SAFE_FREE(maps); @@ -1046,7 +1046,7 @@ BOOL get_sid_list_of_group(gid_t gid, DOM_SID **sids, int *num_sids) NT_STATUS_IS_OK(enum_aliasmem(&sid, &members, &num_members)) ) { for (i=0; i<num_members; i++) { - add_sid_to_array(members[i], sids, num_sids); + add_sid_to_array(&members[i], sids, num_sids); if (sids == NULL) return False; diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c index db88ea7aea..1d1e74cd6f 100644 --- a/source3/passdb/util_sam_sid.c +++ b/source3/passdb/util_sam_sid.c @@ -306,14 +306,14 @@ BOOL map_name_to_wellknown_sid(DOM_SID *sid, enum SID_NAME_USE *use, const char return False; } -void add_sid_to_array(DOM_SID sid, DOM_SID **sids, int *num) +void add_sid_to_array(const DOM_SID *sid, DOM_SID **sids, int *num) { *sids = Realloc(*sids, ((*num)+1) * sizeof(DOM_SID)); if (*sids == NULL) return; - sid_copy(&((*sids)[*num]), &sid); + sid_copy(&((*sids)[*num]), sid); *num += 1; return; |