summaryrefslogtreecommitdiff
path: root/src/passwd/getspnam_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/passwd/getspnam_r.c')
-rw-r--r--src/passwd/getspnam_r.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passwd/getspnam_r.c b/src/passwd/getspnam_r.c
index 1b95dbb6..541e8531 100644
--- a/src/passwd/getspnam_r.c
+++ b/src/passwd/getspnam_r.c
@@ -94,6 +94,8 @@ int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct
return errno;
}
} else {
+ if (errno != ENOENT && errno != ENOTDIR)
+ return errno;
f = fopen("/etc/shadow", "rbe");
if (!f) {
if (errno != ENOENT && errno != ENOTDIR)