diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-03-10 16:17:46 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-03-10 16:17:46 +0000 |
commit | faab4f3c27d994add8691817c2ec965e459fce96 (patch) | |
tree | 6beeaf76a3d70968be54fdb73bb2c10e696604c4 /source3 | |
parent | c3d851fc7437cda798ca38faaad0e448097b46bc (diff) | |
download | samba-faab4f3c27d994add8691817c2ec965e459fce96.tar.gz samba-faab4f3c27d994add8691817c2ec965e459fce96.tar.bz2 samba-faab4f3c27d994add8691817c2ec965e459fce96.zip |
Don't pass DOM_SIDs around when pointers are enough.
Volker
(This used to be commit 27b27c28cd0421be3121e7f03c237df381c7ecb3)
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; |