about summary refs log tree commit diff
path: root/nscd/nscd_getgr_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd_getgr_r.c')
-rw-r--r--nscd/nscd_getgr_r.c4
1 files changed, 4 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;
     }
 }