summaryrefslogtreecommitdiff
path: root/modules/mgetgroups
Commit message (Collapse)AuthorAgeFilesLines
* mgetgroups: remove dependency on realloc-gnuPaul Eggert2013-10-131-1/+1
| | | | | | | | | | | 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.
* mgetgroups: relax license to LGPLv2+Eric Blake2013-07-031-1/+1
| | | | | | | | | | | | | | 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>
* mgetgroups: Move AC_LIBOBJ invocations to module description.Bruno Haible2011-06-161-0/+1
| | | | | * m4/mgetgroups.m4 (gl_MGETGROUPS): Remove AC_LIBOBJ invocation. * modules/mgetgroups (Makefile.am): Augment lib_SOURCES.
* hash, mgetgroups: drop xalloc dependencyEric Blake2011-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* Rename module 'realloc' -> 'realloc-gnu'.Bruno Haible2010-08-281-1/+1
|
* mgetgroups: add xgetgroups, and avoid ENOSYS failuresEric Blake2009-12-041-0/+1
| | | | | | | | | | | | | | | 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>
* mgetgroups: new module, taken from coreutilsEric Blake2009-11-131-0/+26
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>