diff options
author | Volker Lendecke <vl@samba.org> | 2010-06-10 15:40:14 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-06-10 15:28:26 +0200 |
commit | f66cc827096c53d4d16b8c850c83a3b5664e9725 (patch) | |
tree | 12d6505a748737f7e3a8a056778e3533a6a6c039 /source3/passdb | |
parent | ba809ecb8ab217e4376bf75d2300e146b62b88eb (diff) | |
download | samba-f66cc827096c53d4d16b8c850c83a3b5664e9725.tar.gz samba-f66cc827096c53d4d16b8c850c83a3b5664e9725.tar.bz2 samba-f66cc827096c53d4d16b8c850c83a3b5664e9725.zip |
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
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index b81d1e6b92..d2b4f4fbba 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -4441,12 +4441,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; } @@ -4489,6 +4483,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; |