On Fri, Jan 1, 2010 at 8:49 AM, wrote:
Greetings,
Greetings,
fixing this. I'd like to fixup the test to play nicer. The real fix
will be to use getgrouplist(3) instead of getgroups(2). I don't know
what work getgroups(2) entails but the docs say getgrouplist(3) is
based on top of the getgrent functions which will enumerate
/etc/groups (or the equivalent) at runtime. I hope that's an
acceptable change. It could be restricted by hints to particular
platforms.
Maybe fix it like:
#ifdef HAS_GETGROUPLIST
new impl
#else
#ifdef HAS_GETGROUPS
existing impl
#else
existing failback
#endif
#endif
I've re-written much of t/op/groups.t because the original relied
heavily on assumptions like "there'd never be spaces or parens in
that" or "you can always getgrgid your primary group" which is all
false on my DirectoryService administered Mac OS X. Trying the test in
a few different environments because he behavior of $( and `id -a`
differ depending on whether I'm connected to my work network or not.
I'll push the commit once I know it passes everywhere I've got access
to.
I think I'm going to have to ramp-up on how the Configure system works
now so I can use that new HAS_GETGROUPLIST.
Josh