about summary refs log tree commit diff
path: root/nis
diff options
context:
space:
mode:
Diffstat (limited to 'nis')
-rw-r--r--nis/nss_compat/compat-pwd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c
index 6edc9a81ea..21529c4c28 100644
--- a/nis/nss_compat/compat-pwd.c
+++ b/nis/nss_compat/compat-pwd.c
@@ -1451,7 +1451,10 @@ internal_getpwuid_r (uid_t uid, struct passwd *result, ent_t *ent,
           buffer[buflen - 1] = '\xff';
           p = fgets (buffer, buflen, ent->stream);
           if (p == NULL && feof (ent->stream))
-            return NSS_STATUS_NOTFOUND;
+	    {
+	      *errnop = ENOENT;
+	      return NSS_STATUS_NOTFOUND;
+	    }
           if (p == NULL || buffer[buflen - 1] != '\xff')
             {
               fsetpos (ent->stream, &pos);