summaryrefslogtreecommitdiff
path: root/source3/passdb
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/passdb
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/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 205b178a93..28df56bdb1 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2886,8 +2886,9 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
/* This sid will be replaced later */
- if (!add_sid_to_array_unique(mem_ctx, &global_sid_NULL, pp_sids, &num_sids)) {
- ret = NT_STATUS_NO_MEMORY;
+ ret = add_sid_to_array_unique(mem_ctx, &global_sid_NULL, pp_sids,
+ &num_sids);
+ if (!NT_STATUS_IS_OK(ret)) {
goto done;
}
@@ -2926,9 +2927,9 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
ret = NT_STATUS_NO_MEMORY;
goto done;
}
- if (!add_sid_to_array_unique(mem_ctx, &sid, pp_sids,
- &num_sids)) {
- ret = NT_STATUS_NO_MEMORY;
+ ret = add_sid_to_array_unique(mem_ctx, &sid, pp_sids,
+ &num_sids);
+ if (!NT_STATUS_IS_OK(ret)) {
goto done;
}
}
@@ -3646,14 +3647,17 @@ static NTSTATUS ldapsam_enum_aliasmem(struct pdb_methods *methods,
for (i=0; i<count; i++) {
DOM_SID member;
+ NTSTATUS status;
if (!string_to_sid(&member, values[i]))
continue;
- if (!add_sid_to_array(NULL, &member, pp_members, &num_members)) {
+ status = add_sid_to_array(NULL, &member, pp_members,
+ &num_members);
+ if (!NT_STATUS_IS_OK(status)) {
ldap_value_free(values);
ldap_msgfree(result);
- return NT_STATUS_NO_MEMORY;
+ return status;
}
}