diff options
Diffstat (limited to 'src/passwd.c')
-rw-r--r-- | src/passwd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/passwd.c b/src/passwd.c index 37b898d..8e566a2 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -32,7 +32,7 @@ #include <config.h> -#ident "$Id: passwd.c 3643 2011-11-19 22:00:00Z nekral-guest $" +#ident "$Id: passwd.c 3710 2012-02-13 20:32:00Z nekral-guest $" #include <errno.h> #include <fcntl.h> @@ -1057,6 +1057,12 @@ int main (int argc, char **argv) */ sp = getspnam (name); /* !USE_PAM, no need for xgetspnam */ if (NULL == sp) { + if (errno == EACCES) { + (void) fprintf (stderr, + _("%s: Permission denied.\n"), + Prog); + exit (E_NOPERM); + } sp = pwd_to_spwd (pw); } |