This is the mail archive of the cygwin-developers mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Apr 17 10:23, Corinna Vinschen wrote: > On Apr 16 22:50, Bryan Berns wrote: > > Posting here because that's what Corinna told me to do. > > > > So I was looking into the issue I found with Cygwin not caching > > orphaned / unknown groups. At least for my test case, this appears to > > be rooted in the RID getting striped from the end of the SID just > > prior to the line being outputted (line 2464 from the exert below) > > within fetch_account_from_windows(). > > > > uinfo.cc: 2460: /* Check if we know the domain. If so, create a passwd/group > > uinfo.cc: 2461: entry with domain prefix and RID as username. */ > > uinfo.cc: 2462: PDS_DOMAIN_TRUSTSW td = NULL; > > uinfo.cc: 2463: > > uinfo.cc: 2464: sid_sub_auth_count (sid) = sid_sub_auth_count (sid) - 1; > > > > It's not clear to me, in general, why we're interested in creating a > > "passwd/group entry with domain prefix and RID as username". > > Counter question. Why not? The result is that you know it's some > account from a known domain, and the combination of the domain name > and the RID results in a unique account name. > > Thanks for looking into this and tracking it down to this point. > The problem in your case is that the sid isn't reverted in the > following !domain branch. > > Please try this patch: > > diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc > index 6186327..91d1d1c 100644 > --- a/winsup/cygwin/uinfo.cc > +++ b/winsup/cygwin/uinfo.cc > @@ -2475,10 +2475,10 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) > posix_offset = fetch_posix_offset (td, &loc_ldap); > break; > } > + sid_sub_auth_count (sid) = sid_sub_auth_count (sid) + 1; > } > if (domain) > { > - sid_sub_auth_count (sid) = sid_sub_auth_count (sid) + 1; > wcscpy (dom, domain); > __small_swprintf (name = namebuf, L"%W(%u)", > is_group () ? L"Group" : L"User", > I applied this patch to git HEAD. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Attachment:
pgp3XHgICaDmc.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |