aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-07-21 19:57:36 -0500
committerRob Landley <rob@landley.net>2014-07-21 19:57:36 -0500
commit4fd07e0f6698cdb873aab0113369eb36c81853a9 (patch)
treef146d813c9aeb91cd937e35d5d239c9c161b5ec4 /lib
parent546b293cb9369c9c421981c71577af29d83b925a (diff)
downloadtoybox-4fd07e0f6698cdb873aab0113369eb36c81853a9.tar.gz
Improve gid/uid error messages.
Diffstat (limited to 'lib')
-rw-r--r--lib/xwrap.c6
1 files changed, 4 insertions, 2 deletions
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;
}