about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_getgr_r.c4
-rw-r--r--nscd/nscd_gethst_r.c2
-rw-r--r--nscd/nscd_getpw_r.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index 7d2caac088..cb5a8d6050 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -207,6 +207,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
       if (__read (sock, resultbuf->gr_mem[0], total_len) != total_len)
 	{
 	  __close (sock);
+	  /* The `errno' to some value != ERANGE.  */
+	  __set_errno (ENOENT);
 	  return -1;
 	}
 
@@ -216,6 +218,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
   else
     {
       __close (sock);
+      /* The `errno' to some value != ERANGE.  */
+      __set_errno (ENOENT);
       return -1;
     }
 }
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 46f1611c63..961f69538a 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -299,6 +299,8 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
       *h_errnop = hst_resp.error;
 
       __close (sock);
+      /* The `errno' to some value != ERANGE.  */
+      __set_errno (ENOENT);
       return -1;
     }
 }
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index 5050253bd2..e0600cb9de 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -177,6 +177,8 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type,
   else
     {
       __close (sock);
+      /* The `errno' to some value != ERANGE.  */
+      __set_errno (ENOENT);
       return -1;
     }
 }