Cygwin: passwd/group: drop fetching case-correct group names from LDAP
Commit 4e34a39b5c
made sure all user and
group names are case-correct, but it introduced a hefty performance hit
on starting the first Cygwin process.
Adding an ldap call for each AD group in a user token takes its toll in
bigger AD environments with lots of groups in a user token. Real-life
example: 300 groups w/ roundtrip time to the LDAP server of 0.25 secs
per call...
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
5fcbbf7ead
commit
18c203fb6e
|
@ -2427,12 +2427,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
|
|||
|
||||
if (is_domain_account)
|
||||
{
|
||||
/* Overwrite group name to be sure case is same as in SAM */
|
||||
if (is_group()
|
||||
&& cldap->fetch_ad_account (sid, true, domain)
|
||||
&& (val = cldap->get_account_name ()))
|
||||
wcscpy (name, val);
|
||||
/* Skip the rest if creating group entries and for non-users. */
|
||||
/* Skip this when creating group entries and for non-users. */
|
||||
if (is_group() || acc_type != SidTypeUser)
|
||||
break;
|
||||
/* On AD machines, use LDAP to fetch domain account infos. */
|
||||
|
|
Loading…
Reference in New Issue