From: Jim Meyering Date: Mon, 26 Jun 2000 06:32:58 +0000 (+0000) Subject: `id -Gn' (invoked by groups) would fail without giving a diagnostic X-Git-Tag: FILEUTILS-4_0w~59 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=9abfcc500a6049f1278e5fd293f8d05174f18eb4;p=thirdparty%2Fcoreutils.git `id -Gn' (invoked by groups) would fail without giving a diagnostic on malconfigured systems. (print_user): Give a diagnostic if number->name lookup fails. (print_group): Likewise. --- diff --git a/src/id.c b/src/id.c index e574883188..50f5a73da1 100644 --- a/src/id.c +++ b/src/id.c @@ -208,7 +208,10 @@ print_user (uid_t uid) { pwd = getpwuid (uid); if (pwd == NULL) - problems++; + { + error (0, 0, _("cannot find name for user ID %u"), uid); + problems++; + } } if (pwd == NULL) @@ -228,7 +231,10 @@ print_group (gid_t gid) { grp = getgrgid (gid); if (grp == NULL) - problems++; + { + error (0, 0, _("cannot find name for group ID %u"), gid); + problems++; + } } if (grp == NULL)