summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_util.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-09 00:11:31 +0100
committerMichael Adam <obnox@samba.org>2008-01-09 01:47:10 +0100
commitf3603d5a5ab878d45b67bf0f33e2beca50d0af2d (patch)
tree5d9cd096404ddc55941cbc60751ce19fa4146411 /source3/winbindd/winbindd_util.c
parentde53e47c76cc6dfdc8056be1e376549b9e8a94a4 (diff)
downloadsamba-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_util.c')
-rw-r--r--source3/winbindd/winbindd_util.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index cc12d4b7ea..dc48fdef8b 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -1304,19 +1304,22 @@ NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
/* always add the primary group to the sid array */
sid_compose(&primary_group, &info3->dom_sid.sid, info3->user_rid);
- if (!add_sid_to_array(mem_ctx, &primary_group, user_sids, &num_groups)) {
+ status = add_sid_to_array(mem_ctx, &primary_group, user_sids,
+ &num_groups);
+ if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(info3);
- return NT_STATUS_NO_MEMORY;
+ return status;
}
for (i=0; i<info3->num_groups; i++) {
sid_copy(&group_sid, &info3->dom_sid.sid);
sid_append_rid(&group_sid, info3->gids[i].g_rid);
- if (!add_sid_to_array(mem_ctx, &group_sid, user_sids,
- &num_groups)) {
+ status = add_sid_to_array(mem_ctx, &group_sid, user_sids,
+ &num_groups);
+ if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(info3);
- return NT_STATUS_NO_MEMORY;
+ return status;
}
}
@@ -1328,11 +1331,11 @@ NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
if (info3->other_sids_attrib[i] & SE_GROUP_RESOURCE)
continue;
- if (!add_sid_to_array(mem_ctx, &info3->other_sids[i].sid,
- user_sids, &num_groups))
- {
+ status = add_sid_to_array(mem_ctx, &info3->other_sids[i].sid,
+ user_sids, &num_groups);
+ if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(info3);
- return NT_STATUS_NO_MEMORY;
+ return status;
}
}