diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
commit | ea839a52aebd6a29a8dde70412b0e7b8d68568b4 (patch) | |
tree | 10026e84c8b73d4e5ad6704ab1cb78ea7c63c305 /src/passwd.c | |
parent | 6c1662a897fd34b5b0b0174ab83552b016d05e8d (diff) | |
download | shadow-upstream/4.1.5.1.tar.gz |
Imported Upstream version 4.1.5.1upstream/4.1.5.1upstream
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); } |