summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-10 15:40:14 +0200
committerKarolin Seeger <kseeger@samba.org>2010-06-10 16:09:33 +0200
commitbd6a48e687636d5d9489129faff00e45d50d0d31 (patch)
tree423db50bc4f324fdbb81526a8c18cc562eff424d /source3
parentb206d75ca5ba04a866a22dfca5b7441fb49078d8 (diff)
downloadsamba-bd6a48e687636d5d9489129faff00e45d50d0d31.tar.gz
s3: Fix EnumDomainAliases when no aliases are in LDAP
We used to return NT_STATUS_ACCESS_DENIED, now we just return 0 entries, just like W2k8 does. usrmgr.exe was pretty unhappy with the NT_STATUS_ACCESS_DENIED (cherry picked from commit f66cc827096c53d4d16b8c850c83a3b5664e9725) Fix bug #7262 (Unable to maintain users' groups via UsrMgr). (cherry picked from commit 1439a1d7ff406dd5dce885100349751151c14bf6)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_ldap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 249a990d257..559b87cfde1 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -4416,12 +4416,6 @@ static bool ldapsam_search_firstpage(struct pdb_search *search)
}
state->current_entry = ldap_first_entry(ld, state->entries);
- if (state->current_entry == NULL) {
- ldap_msgfree(state->entries);
- state->entries = NULL;
- return false;
- }
-
return True;
}
@@ -4464,6 +4458,10 @@ static bool ldapsam_search_next_entry(struct pdb_search *search,
bool result;
retry:
+ if (state->current_entry == NULL) {
+ return false;
+ }
+
if ((state->entries == NULL) && (state->pagedresults_cookie == NULL))
return False;