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: [1.7] getgroups regression?


On Dec  4 22:48, Eric Blake wrote:
> Meanwhile, is sorting and/or pruning duplicate getgroups results something that 
> cygwin should consider doing?  POSIX is explicit that the result is a 
> mathematical set, and that two processes can have the same set membership but 
> different orders based on the sequence of events that created those two 
> processes.  But will Linux ever list a duplicate, even if duplicates appear 
> in /etc/group?

Probably not.  I assume the job of getgroups() is much easier on Linux.
It just has to list the gids in the group list.  Cygwin fetches the
/etc/group file and verifies for each entry if its SID is in the process
token.  Avoiding dups requires YA loop in the loop, I don't think it's
actually worth the effort.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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