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_ads.c | |
parent | de53e47c76cc6dfdc8056be1e376549b9e8a94a4 (diff) | |
download | samba-f3603d5a5ab878d45b67bf0f33e2beca50d0af2d.tar.gz samba-f3603d5a5ab878d45b67bf0f33e2beca50d0af2d.tar.bz2 samba-f3603d5a5ab878d45b67bf0f33e2beca50d0af2d.zip |
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_ads.c')
-rw-r--r-- | source3/winbindd/winbindd_ads.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index 3aba824b0b..f963669825 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -596,8 +596,9 @@ static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain, num_groups = 0; /* always add the primary group to the sid array */ - if (!add_sid_to_array(mem_ctx, primary_group, user_sids, &num_groups)) { - status = NT_STATUS_NO_MEMORY; + status = add_sid_to_array(mem_ctx, primary_group, user_sids, + &num_groups); + if (!NT_STATUS_IS_OK(status)) { goto done; } @@ -615,10 +616,10 @@ static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain, if (sid_check_is_in_builtin(&group_sid)) { continue; } - - if (!add_sid_to_array(mem_ctx, &group_sid, user_sids, - &num_groups)) { - status = NT_STATUS_NO_MEMORY; + + status = add_sid_to_array(mem_ctx, &group_sid, + user_sids, &num_groups); + if (!NT_STATUS_IS_OK(status)) { goto done; } } @@ -684,8 +685,9 @@ static NTSTATUS lookup_usergroups_memberof(struct winbindd_domain *domain, num_groups = 0; /* always add the primary group to the sid array */ - if (!add_sid_to_array(mem_ctx, primary_group, user_sids, &num_groups)) { - status = NT_STATUS_NO_MEMORY; + status = add_sid_to_array(mem_ctx, primary_group, user_sids, + &num_groups); + if (!NT_STATUS_IS_OK(status)) { goto done; } @@ -720,10 +722,10 @@ static NTSTATUS lookup_usergroups_memberof(struct winbindd_domain *domain, if (sid_check_is_in_builtin(&group_sids[i])) { continue; } - - if (!add_sid_to_array(mem_ctx, &group_sids[i], user_sids, - &num_groups)) { - status = NT_STATUS_NO_MEMORY; + + status = add_sid_to_array(mem_ctx, &group_sids[i], user_sids, + &num_groups); + if (!NT_STATUS_IS_OK(status)) { goto done; } @@ -861,8 +863,9 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, *user_sids = NULL; num_groups = 0; - if (!add_sid_to_array(mem_ctx, &primary_group, user_sids, &num_groups)) { - status = NT_STATUS_NO_MEMORY; + status = add_sid_to_array(mem_ctx, &primary_group, user_sids, + &num_groups); + if (!NT_STATUS_IS_OK(status)) { goto done; } @@ -872,10 +875,10 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, if (sid_check_is_in_builtin(&sids[i])) { continue; } - - if (!add_sid_to_array_unique(mem_ctx, &sids[i], - user_sids, &num_groups)) { - status = NT_STATUS_NO_MEMORY; + + status = add_sid_to_array_unique(mem_ctx, &sids[i], + user_sids, &num_groups); + if (!NT_STATUS_IS_OK(status)) { goto done; } } |