From 3770f6093f89198151ca872c2115aff0b6079772 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Sun, 20 Aug 2006 18:21:50 +0200 Subject: [PATCH] fix 'unknow user' error from getpwnam/getgrnam --- udev_sysdeps.c | 4 ++-- 1 file 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));