Bug 16727: Handle ERANGE for getgr; fixes user in many groups
authorMarc Brockschmidt <he@debian.org>
Mon, 28 Jul 2008 20:09:53 +0000 (16:09 -0400)
committerColin Walters <walters@verbum.org>
Mon, 28 Jul 2008 20:14:18 +0000 (16:14 -0400)
commit9d51f086b05df196b94234d6a0d388594feedd73
tree7dab91cd2603b1f6a67febdeb7e0433bc86fa034
parent121c6b13a35759ee590551cfb9978e9f20766a12
Bug 16727: Handle ERANGE for getgr; fixes user in many groups

Patch originally from Noèl Köthe.
Modified by Colin Walters <walters@verbum.org>

* dbus/dbus-sysdeps-unix.c, dbus/dbus-sysdeps-unix-utils.c:
Use a while() loop to reallocate buffer if we get ERANGE
return.  This fixes the case where a user is in a large
number of groups.
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-util-unix.c