From 4fd07e0f6698cdb873aab0113369eb36c81853a9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 21 Jul 2014 19:57:36 -0500 Subject: Improve gid/uid error messages. --- lib/xwrap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/xwrap.c b/lib/xwrap.c index 7e495caf..583a4cae 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -450,14 +450,16 @@ struct passwd *xgetpwuid(uid_t uid) struct group *xgetgrgid(gid_t gid) { struct group *group = getgrgid(gid); - if (!group) error_exit("bad gid %ld", (long)gid); + + if (!group) perror_exit("gid %ld", (long)gid); return group; } struct passwd *xgetpwnam(char *name) { struct passwd *up = getpwnam(name); - if (!up) error_exit("bad user '%s'", name); + + if (!up) perror_exit("user '%s'", name); return up; } -- cgit v1.2.3