* autoload.cc (ldap_abandon): Remove.
(ldap_count_entries): Import. (ldap_get_next_page_s): Import. (ldap_result): Remove. (ldap_searchW): Remove. (ldap_search_abandon_page): Import. (ldap_search_init_pageW): Import. * ldap.cc (cyg_ldap::close): Use ldap_search_abandon_page to abandon search. Reset srch_id, srch_msg and srch_entry. (cyg_ldap::enumerate_ad_accounts): Use paged search to overcome server side search result set restriction. (cyg_ldap::next_account): Ditto. * ldap.h (class cyg_ldap): Add members srch_id, srch_msg and srch_entry. Remove member msg_id. (cyg_ldap::cyg_ldap): Change initialization accordingly.
This commit is contained in:
@@ -33,7 +33,8 @@ class cyg_ldap {
|
||||
PWCHAR *val;
|
||||
PWCHAR *attr;
|
||||
bool isAD;
|
||||
ULONG msg_id;
|
||||
PLDAPSearch srch_id;
|
||||
PLDAPMessage srch_msg, srch_entry;
|
||||
|
||||
bool connect_ssl (PCWSTR domain);
|
||||
bool connect_non_ssl (PCWSTR domain);
|
||||
@@ -43,8 +44,8 @@ class cyg_ldap {
|
||||
uint32_t get_num_attribute (int idx);
|
||||
|
||||
public:
|
||||
cyg_ldap () : lh (NULL), rootdse (NULL), msg (NULL), entry (NULL),
|
||||
val (NULL), isAD (false), msg_id ((ULONG) -1)
|
||||
cyg_ldap () : lh (NULL), rootdse (NULL), msg (NULL), entry (NULL), val (NULL),
|
||||
isAD (false), srch_id (NULL), srch_msg (NULL), srch_entry (NULL)
|
||||
{}
|
||||
~cyg_ldap () { close (); }
|
||||
|
||||
|
Reference in New Issue
Block a user