From 9abfcc500a6049f1278e5fd293f8d05174f18eb4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 26 Jun 2000 06:32:58 +0000 Subject: `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. --- src/id.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/id.c b/src/id.c index e57488318..50f5a73da 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) -- cgit v1.2.3-54-g00ecf