This is the mail archive of the cygwin-apps 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: ATTENTION: Tcl/Tk transition


On Oct 28 03:20, Yaakov (Cygwin/X) wrote:
> On Fri, 2011-10-28 at 09:56 +0200, Corinna Vinschen wrote:
> > > On Thu, Oct 27, 2011 at 10:11:03PM -0500, Yaakov (Cygwin/X) wrote:
> > > >On Thu, 2011-10-27 at 10:07 +0200, Corinna Vinschen wrote:
> > > >> Cool, thanks!  You don't want to take over ruby maintainership as well,
> > > >> do you? :}
> > > >
> > > >Would your adding getgrouplist(3) be a fair price? :-)
> > > >
> > > >http://www.kernel.org/doc/man-pages/online/pages/man3/getgrouplist.3.html
> > > >
> > > >I need this for an attempt to port polkit-1, and I haven't learned that
> > > >part of the codebase yet.  Deal? :-)
> > 
> > Deal!
> 
> Done.  ruby-1.8.7-p352 with separate ruby-tcltk package is ready.

Cool, thanks!

> > I assume you want the full group list, represented by the user's token
> > if one would like to construct the token, right?
> 
> See the "spec" noted above, but if ngroups is correctly sized, all
> groups to which the given user belongs are returned AND the given group
> even if the user is not a member thereof.

Uh, maybe I wasn't clear.  I didn't talk about Linux or so, I was
just refering to two possible implementations on Cygwin, one looking
into /etc/groups only, the other fetching the information from the OS.
But that was YA ENOCOFFEE question since I gave up on using the
supplemetary groups from /etc/group anyway.  Only what the OS allows
should count.

> > If so, that requires to create a SID list by fetching the information
> > from the local SAM and AD, quite similar to the initgroups function.
> > 
> > On second thought, that would be practically identical to our
> > initgroups32 function, except for the cygheap->user.groups.update_supp
> > call, which would be replaced by filling the group list given as
> > argument.
> 
> That makes sense, given that on BSD[1], initgroups(3) is basically
> getgrouplist() followed by setgroups().  The primary difference will be
> adding the given group if not a member and assuring proper size of
> ngroups.  (Yes, I did look into this myself once upon a time.)

Yup, I'm comparing the implementations of glibc and FreeBSD right
now.  The Linux getgrouplist man page doesn't tell anything of
the handling of NULL pointers, so I had to use the source to see
how they handle this.  FreeBSD asserts, GLibc just crashes.  FreeBSD
also allows a NULL group pointer if *ngroups is 0.  I like FreeBSD 
better here, so I'll do the same.


Corinna

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


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