summaryrefslogtreecommitdiff
path: root/udev_sysdeps.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2006-08-20 18:21:50 +0200
committerKay Sievers <kay.sievers@suse.de>2006-08-20 18:21:50 +0200
commit3770f6093f89198151ca872c2115aff0b6079772 (patch)
tree87f6261d7362730b4574f924c5d45bac432bc887 /udev_sysdeps.c
parentc472055c900014849fff93a1de551c42561c21c9 (diff)
fix 'unknow user' error from getpwnam/getgrnam
Diffstat (limited to 'udev_sysdeps.c')
-rw-r--r--udev_sysdeps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udev_sysdeps.c b/udev_sysdeps.c
index c0b2d70b6e..9ec5a73ed9 100644
--- a/udev_sysdeps.c
+++ b/udev_sysdeps.c
@@ -99,7 +99,7 @@ uid_t lookup_user(const char *user)
pw = getpwnam(user);
if (pw == NULL) {
- if (errno == 0)
+ if (errno == 0 || errno == ENOENT || errno == ESRCH)
err("specified user unknown '%s'", user);
else
err("error resolving user '%s': %s", user, strerror(errno));
@@ -116,7 +116,7 @@ gid_t lookup_group(const char *group)
gr = getgrnam(group);
if (gr == NULL) {
- if (errno == 0)
+ if (errno == 0 || errno == ENOENT || errno == ESRCH)
err("specified group unknown '%s'", group);
else
err("error resolving group '%s': %s", group, strerror(errno));