about summary refs log tree commit diff
path: root/nss/getXXent_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/getXXent_r.c')
-rw-r--r--nss/getXXent_r.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c
index aa21b6fe7c..b709a4a935 100644
--- a/nss/getXXent_r.c
+++ b/nss/getXXent_r.c
@@ -279,7 +279,12 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
 	    if (! no_more)
 	      status = (*sfct) (STAYOPEN_TMPVAR);
 	    else
-	      status = NSS_STATUS_NOTFOUND;
+	      {
+		status = NSS_STATUS_NOTFOUND;
+		if (no_more == 1)
+		  /* There is no more module to search.  */
+		  break;
+	      }
 	  }
 	while (! no_more && status != NSS_STATUS_SUCCESS);
     }