summaryrefslogtreecommitdiff
path: root/source3/libgpo
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/libgpo
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/libgpo')
-rw-r--r--source3/libgpo/gpo_ldap.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/libgpo/gpo_ldap.c b/source3/libgpo/gpo_ldap.c
index 7c59e8e5dc..4e63b92e4e 100644
--- a/source3/libgpo/gpo_ldap.c
+++ b/source3/libgpo/gpo_ldap.c
@@ -643,9 +643,12 @@ ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
token_sids = TALLOC_ARRAY(mem_ctx, DOM_SID, 1);
ADS_ERROR_HAVE_NO_MEMORY(token_sids);
- if (!add_sid_to_array_unique(mem_ctx, &primary_group_sid, &token_sids,
- &num_token_sids)) {
- return ADS_ERROR(LDAP_NO_MEMORY);
+ status = ADS_ERROR_NT(add_sid_to_array_unique(mem_ctx,
+ &primary_group_sid,
+ &token_sids,
+ &num_token_sids));
+ if (!ADS_ERR_OK(status)) {
+ return status;
}
for (i = 0; i < num_ad_token_sids; i++) {
@@ -654,9 +657,12 @@ ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
continue;
}
- if (!add_sid_to_array_unique(mem_ctx, &ad_token_sids[i],
- &token_sids, &num_token_sids)) {
- return ADS_ERROR(LDAP_NO_MEMORY);
+ status = ADS_ERROR_NT(add_sid_to_array_unique(mem_ctx,
+ &ad_token_sids[i],
+ &token_sids,
+ &num_token_sids));
+ if (!ADS_ERR_OK(status)) {
+ return status;
}
}