* ldap.cc (cyg_ldap::fetch_ad_account): Take additional domain string

parameter.  Convert into likely rootDSE string if not NULL, and use in
	subsequent call to ldap_search_stW.  Add comment to explain that this
	is not the exactly correct solution.
	* ldap.h (cyg_ldap::fetch_ad_account): Change prototype accordingly.
	* uinfo.cc (pwdgrp::fetch_account_from_windows): Always use loc_ldap
	in call to fetch_posix_offset to make sure we're fetchoinmg the posix
	offsets from *our* domain controller.  Only set domain variable to
	non-NULL if the account is from a trusted domain.  Use domain in call
	to cyg_ldap::fetch_ad_account.
This commit is contained in:
Corinna Vinschen
2014-05-22 14:50:24 +00:00
parent ece6c8e383
commit 03e3cf9846
4 changed files with 43 additions and 13 deletions

View File

@ -51,7 +51,7 @@ public:
operator PLDAP () const { return lh; }
bool open (PCWSTR in_domain);
void close ();
bool fetch_ad_account (PSID sid, bool group);
bool fetch_ad_account (PSID sid, bool group, PCWSTR domain = NULL);
bool enumerate_ad_accounts (PCWSTR domain, bool group);
bool next_account (cygsid &sid);
uint32_t fetch_posix_offset_for_domain (PCWSTR domain);