diff options
| author | Eric Blake <ebb9@byu.net> | 2009-11-12 11:59:09 -0700 |
|---|---|---|
| committer | Eric Blake <ebb9@byu.net> | 2009-11-13 07:50:20 -0700 |
| commit | 6a31fd8d732afd232d6a99708192170e13129374 (patch) | |
| tree | a02c4dc471e03a5b54820a03776097ffc1a5e08f /src/id.c | |
| parent | build: bootstrap: add a comment; generalize autoheader check (diff) | |
| download | coreutils-6a31fd8d732afd232d6a99708192170e13129374.tar.gz coreutils-6a31fd8d732afd232d6a99708192170e13129374.zip | |
build: update gnulib, for getgroups improvements
A replacement getgroups is now guaranteed to exist, but it may
fail with ENOSYS. mgetgroups is moved to gnulib, and now takes
gid_t instead of GETGROUPS_T (but setgroups still needs GETGROUPS_T).
* gnulib: Update to latest.
* gl/modules/mgetgroups: Delete, moved to gnulib.
* gl/m4/mgetgroups.m4: Likewise.
* gl/lib/mgetgroups.h: Likewise.
* gl/lib/mgetgroups.c: Likewise.
* src/group-list.c (print_group_list): Adjust callers.
* src/id.c (print_full_info): Likewise.
Diffstat (limited to 'src/id.c')
| -rw-r--r-- | src/id.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -292,14 +292,13 @@ print_full_info (const char *username) printf ("(%s)", grp->gr_name); } -#if HAVE_GETGROUPS { - GETGROUPS_T *groups; + gid_t *groups; int i; int n_groups = mgetgroups (username, (pwd ? pwd->pw_gid : (gid_t) -1), &groups); - if (n_groups < 0) + if (n_groups < 0 && errno != ENOSYS) { if (username) { @@ -327,7 +326,6 @@ print_full_info (const char *username) } free (groups); } -#endif /* HAVE_GETGROUPS */ /* POSIX mandates the precise output format, and that it not include any context=... part, so skip that if POSIXLY_CORRECT is set. */ |
