<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/gl/lib/mgetgroups.c, branch v7.3</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.3</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-04-09T13:07:29Z</updated>
<entry>
<title>id: fix infinite loop on some systems</title>
<updated>2009-04-09T13:07:29Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-04-08T09:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bf87a2c8ea4487ca4448c9fe42a9c9858400acbd'/>
<id>urn:sha1:bf87a2c8ea4487ca4448c9fe42a9c9858400acbd</id>
<content type='text'>
Steven Parkes reported that `id -G $USER` went into an infinite loop
on Darwin systems for users in more than 10 groups:
http://bugs.gentoo.org/show_bug.cgi?id=264007
* gl/lib/mgetgroups.c (mgetgroups): Work around buggy getgrouplist
implementations that don't update the required size correctly,
by doubling the result buffer and retrying. Also return the
parameter updated by getgrouplist rather than its return value,
as the documentation doesn't actually state the number of groups
stored is returned by getgrouplist.
* tests/misc/id-groups: Add test to exercise this logic
* tests/Makefile.am: Reference new test
* NEWS: Mention the fix
* THANKS: Update
</content>
</entry>
<entry>
<title>simplify mgetgroups() and avoid -Wsign-compare warnings</title>
<updated>2009-01-16T11:06:09Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-01-14T19:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=46d6df933ec6171fcfa0220dfb8f18f68293797b'/>
<id>urn:sha1:46d6df933ec6171fcfa0220dfb8f18f68293797b</id>
<content type='text'>
* gl/lib/mgetgroups.c: Avoid -Wsign-compare warning by using unsigned
types for the parameters of the new function realloc_groupbuf().
mgetgroups() was refactored to use this function rather than
explicitly allocating and copying from automatic storage itself.
* src/group-list.c: Use int rather than size_t as variable is
used in signed comparisons.
* src/id.c: ditto.
</content>
</entry>
<entry>
<title>* gl/lib/mgetgroups.c (mgetgroups): Parenthesize correctly.</title>
<updated>2008-02-24T17:12:15Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-02-24T17:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9396e9104e9965b9608a3652c18d7c2d94ea3351'/>
<id>urn:sha1:9396e9104e9965b9608a3652c18d7c2d94ea3351</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* gl/lib/mgetgroups.c: Include &lt;stdlib.h&gt;.</title>
<updated>2008-02-24T13:56:19Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-02-24T13:56:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dacff7cb2b2d8765828b10674dc515292584a432'/>
<id>urn:sha1:dacff7cb2b2d8765828b10674dc515292584a432</id>
<content type='text'>
</content>
</entry>
<entry>
<title>id: avoid race when a group is added between getgrouplist calls</title>
<updated>2008-02-22T19:47:54Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-02-22T09:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a15329798c52c57cc16fc24265327d8b1c73ab41'/>
<id>urn:sha1:a15329798c52c57cc16fc24265327d8b1c73ab41</id>
<content type='text'>
* gl/lib/mgetgroups.c (mgetgroups) [N_GROUPS_INIT]: Rename enum.
Use a larger value.
Update *groups only upon success.
Iterate upon failed getgrouplist.
</content>
</entry>
<entry>
<title>id: use getgrouplist when possible</title>
<updated>2008-02-21T14:02:07Z</updated>
<author>
<name>James Youngman</name>
<email>jay@gnu.org</email>
</author>
<published>2008-02-21T14:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=49f7ebaac45f4d20a70c83c8302444b64259c6d3'/>
<id>urn:sha1:49f7ebaac45f4d20a70c83c8302444b64259c6d3</id>
<content type='text'>
* gl/m4/mgetgroups.m4: Check for getgrouplist.
* gl/lib/mgetgroups.c (mgetgroups): Use getgrouplist, if available.
* TODO: Remove the item about switching to getgrouplist.
* NEWS: mention this
</content>
</entry>
<entry>
<title>Update all copyright notices to use the newer form.</title>
<updated>2007-07-23T12:35:58Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-07-23T12:35:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=71aa3ea88084d17bcb4fc1031ad7b66f8647115e'/>
<id>urn:sha1:71aa3ea88084d17bcb4fc1031ad7b66f8647115e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change "version 2" to "version 3" in all copyright notices.</title>
<updated>2007-07-10T11:35:56Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-07-10T10:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=33342c1a0a464f198df3f177432a0e98e482e7a4'/>
<id>urn:sha1:33342c1a0a464f198df3f177432a0e98e482e7a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix typo in comment.</title>
<updated>2007-07-06T23:49:12Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-07-06T23:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=685d3c3f2adfabbf79b626f84be17170b59d449d'/>
<id>urn:sha1:685d3c3f2adfabbf79b626f84be17170b59d449d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>setuidgid: set all groups, not just the primary one;  mgetgroups: new module</title>
<updated>2007-07-06T05:44:39Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2007-07-05T15:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e0066f36c22dce02f9d6327cb881ee7eec6e7539'/>
<id>urn:sha1:e0066f36c22dce02f9d6327cb881ee7eec6e7539</id>
<content type='text'>
I wanted to use the xgetgroups function from id.c, so factored it out
and made it into a non-exiting function (hence the "m" prefix rather than "x").
* src/setuidgid.c (main): Use mgetgroups. Include "mgetgroups.h".

* src/id.c (xgetgroups): Remove function.
Include "mgetgroups.h".
(print_group_list): Use mgetgroups, not xgetgroups.

* gl/modules/mgetgroups: New module.
* gl/lib/mgetgroups.c: New file.  mgetgroups is derived from
id.c's xgetgroups function.
* bootstrap.conf (gnulib_modules): Add mgetgroups.
* gl/m4/mgetgroups.m4: New file.
* gl/lib/mgetgroups.h: New file.
</content>
</entry>
</feed>
