public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: passwd/group: drop fetching case-correct group names from LDAP Date: Fri, 22 Feb 2019 22:34:00 -0000 [thread overview] Message-ID: <20190222223412.124662.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=18c203fb6ebef6e363bb8633fe1673bf2b728e02 commit 18c203fb6ebef6e363bb8633fe1673bf2b728e02 Author: Corinna Vinschen <corinna@vinschen.de> Date: Fri Feb 22 11:04:34 2019 +0100 Cygwin: passwd/group: drop fetching case-correct group names from LDAP Commit 4e34a39b5cdf4c3f889486b7460bea063e579d10 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> Diff: --- winsup/cygwin/uinfo.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 53efc21..bfcce00 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -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. */
reply other threads:[~2019-02-22 22:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190222223412.124662.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).