modules/mgetgroups


Log

Author Commit Date CI Message
Paul Eggert 533101a2 2013-10-13T23:08:42 mgetgroups: remove dependency on realloc-gnu The dependency violates the comment in realloc-gnu, which says that tests can't depend on realloc-gnu; some tests depend on mgetgroups, so mgetgroups can't depend on realloc-gnu. Problem reported by Daniel Richard G. in <http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00056.html>. * lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0). * modules/mgetgroups (Depends-on): Depend on realloc-posix, not realloc-gnu.
Eric Blake 612ef3f7 2013-07-03T15:45:04 mgetgroups: relax license to LGPLv2+ getgrouplist is part of glibc and LGPLv2+; the mgetgroups module is merely an ease-of-use wrapper around this interface. There's nothing in the algorithm worth protecting by the more-restrictive GPLv3+. See also this thread. https://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00092.html * modules/getugroups (License): Change from GPLv3+. * modules/mgetgroups (License): Likewise. * modules/getgroups (License): Change from LGPLv3+. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible de12675d 2011-05-24T00:40:36 mgetgroups: Move AC_LIBOBJ invocations to module description. * m4/mgetgroups.m4 (gl_MGETGROUPS): Remove AC_LIBOBJ invocation. * modules/mgetgroups (Makefile.am): Augment lib_SOURCES.
Eric Blake 83b1d641 2011-04-27T16:23:45 hash, mgetgroups: drop xalloc dependency Rely on the new xalloc-oversized module to avoid requiring xalloc-die for functions documented as returning NULL on potential allocation overflow. * lib/hash.c (includes): Adjust includes. * lib/mgetgroups.c (includes): Likewise. (xgetgroups): Move... * lib/xgetgroups.c: ...to new file. * modules/xgetgroups: New file, split from... * modules/mgetgroups: ...here. (Depends-on): Add xalloc-oversized. * modules/hash (Depends-on): Likewise. * modules/hash-tests (Depends-on): Drop xalloc. (test_hash_LDADD): Drop unused library. * tests/test-hash.c (main): Break xalloc dependency. (includes): Drop unused include. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 8ffb3578 2010-08-28T23:28:26 Rename module 'realloc' -> 'realloc-gnu'.
Eric Blake 3e035a5d 2009-12-04T08:26:23 mgetgroups: add xgetgroups, and avoid ENOSYS failures ENOSYS implies that there are no supplemental groups, so we can treat it the same as a return of 0 from getgroups rather than exposing failure to the user. This in turn fixes a crash in coreutils' id, which freed an uninitialized pointer. * lib/mgetgroups.h (xgetgroups): New prototype. * lib/mgetgroups.c (xgetgroups): New wrapper. (mgetgroups): Handle ENOSYS. * modules/mgetgroups (Depends-on): Add realloc. Reported by Scott Harrison <scott.gnu.2009@scottrix.co.uk>. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 8c4c7e9f 2009-11-12T11:31:52 mgetgroups: new module, taken from coreutils Wrapper function that makes using getgroups/getugroups easier to use. As part of the move from coreutils, convert GETGROUPS_T to gid_t, and allow mgetgroups(NULL,getegid(),&list) as a way to ensure that the effective gid is in the list. * modules/mgetgroups: New file. * lib/mgetgroups.h: Likewise. * lib/mgetgroups.c (mgetgroups): Likewise. * m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise. * MODULES.html.sh (Users and groups): Mention it. Signed-off-by: Eric Blake <ebb9@byu.net>