This is the mail archive of the cygwin 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]

Re: Testers needed: New passwd/group handling in Cygwin

On Mar 11 07:44, Achim Gratz wrote:
> Achim Gratz <Stromeko <at>> writes:
> > IIRC, the next call is the write that prints "no" or "yes"... there may
> > have been something like "stat_helper" inbetween only on Cygwin64, but
> > I'll have to check again tomorrow.
> It's a call to stat_worker with the UNC file path and the stat_worker
> handle, both times returning zero.

zero == success

> There is only one interesting difference
> between the release and the snapshot DLL, they are reporting the atime to be
> different:
> st_atim=531DE525.1B5BB150 (release)
> st_atim=531DF887.5D9B9F8  (snapshot)

Access time.  On Windows it even changes when requesting certain
kinds of metadata :-P

> Whatever differences there are probably inside stat_worker, but I don't
> really know.

stat_worker is just a wrapper.  Nothing happens in there which could
explain any differences.

> I've just found out that cygcheck cuts off the group listing after exactly
> 16kiB.

That's because cygcheck uses a fixed buffer of 16K to collect the
output of the `id' call.

> Maybe there are some other places where it's now possible to overrun
> some buffer (pwdgrp::fetch_account_from_windows has got all of them
> according top the trace) or maybe some other limit for the number of groups?

Not in Cygwin.  The limit is set by the application in the call
to getgroups:

What we have is a NGROUPS_MAX define in limits.h and the equivalent
NGROUPS in sys/param.h.  It's defined as 1024, but it's not used
or enforced anywhere in Cygwin.

>  The group that grants access is number 293 in the list as returned by id...

But the question is, does perl actually use that list?  The strace
snippets don't show anything here.  If it doesn't use the access(2)
call, it would have to load the full ACL of the file and match that
against your token group list.  This requires calls to getgroups (which
would create the litany of group SIDs from fetch_account_from_windows)
and acl.  It's pretty unlikely that perl would do this manually.

> I've also found that two trusted domains aren't returning an entry for
> cyg_ldap::fetch_posix_offset_for_domain from the DC I'm assigned to, so that
> probably explains the long startup times I've been seeing with earlier
> snapshots.  Maybe of interest:
>   987 1803457 [main] perl 6856 alloc_sd: uid 1124017, gid 10513, attribute
> 0x2190

You're still using a group file?  

Anyway, I need the full straces.  It's pretty hard to say anything, let
alone isolate at least the most probable cause without them.  Can you
please run the simple examples under the 2014-03-09 snapshot and send
URLs to the snapshots?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpqhUzjuQ9tU.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]