diff options
author | Michael Adam <obnox@samba.org> | 2008-01-09 00:11:31 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-01-09 01:47:10 +0100 |
commit | f3603d5a5ab878d45b67bf0f33e2beca50d0af2d (patch) | |
tree | 5d9cd096404ddc55941cbc60751ce19fa4146411 /source3/winbindd/winbindd_async.c | |
parent | de53e47c76cc6dfdc8056be1e376549b9e8a94a4 (diff) | |
download | samba-f3603d5a5ab878d45b67bf0f33e2beca50d0af2d.tar.gz |
Convert add_sid_to_array() add_sid_to_array_unique() to return NTSTATUS.
Michael
(This used to be commit 6b2b9a60ef857ec31da5fea631535205fbdede4a)
Diffstat (limited to 'source3/winbindd/winbindd_async.c')
-rw-r--r-- | source3/winbindd/winbindd_async.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd_async.c b/source3/winbindd/winbindd_async.c index 76724582a18..ab32ee0c761 100644 --- a/source3/winbindd/winbindd_async.c +++ b/source3/winbindd/winbindd_async.c @@ -492,7 +492,9 @@ static bool parse_sidlist(TALLOC_CTX *mem_ctx, char *sidstr, DEBUG(0, ("Could not parse sid %s\n", p)); return False; } - if (!add_sid_to_array(mem_ctx, &sid, sids, num_sids)) { + if (!NT_STATUS_IS_OK(add_sid_to_array(mem_ctx, &sid, sids, + num_sids))) + { return False; } p = q; @@ -714,7 +716,9 @@ enum winbindd_result winbindd_dual_getsidaliases(struct winbindd_domain *domain, DEBUGADD(10, (" rid %d\n", alias_rids[i])); sid_copy(&sid, &domain->sid); sid_append_rid(&sid, alias_rids[i]); - if (!add_sid_to_array(state->mem_ctx, &sid, &sids, &num_sids)) { + result = add_sid_to_array(state->mem_ctx, &sid, &sids, + &num_sids); + if (!NT_STATUS_IS_OK(result)) { return WINBINDD_ERROR; } } @@ -832,8 +836,9 @@ static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, bool success, state->sids = NULL; state->num_sids = 0; - if (!add_sid_to_array(mem_ctx, &state->user_sid, &state->sids, - &state->num_sids)) { + if (!NT_STATUS_IS_OK(add_sid_to_array(mem_ctx, &state->user_sid, + &state->sids, &state->num_sids))) + { DEBUG(0, ("Out of memory\n")); state->cont(state->private_data, False, NULL, 0); return; @@ -874,8 +879,11 @@ static void gettoken_recvaliases(void *private_data, bool success, } for (i=0; i<num_aliases; i++) { - if (!add_sid_to_array(state->mem_ctx, &aliases[i], - &state->sids, &state->num_sids)) { + if (!NT_STATUS_IS_OK(add_sid_to_array(state->mem_ctx, + &aliases[i], + &state->sids, + &state->num_sids))) + { DEBUG(0, ("Out of memory\n")); state->cont(state->private_data, False, NULL, 0); return; |