about summary refs log tree commit diff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/getXXent_r.c7
-rw-r--r--nss/nss_files/files-alias.c2
-rw-r--r--nss/nss_files/files-parse.c2
-rw-r--r--nss/nsswitch.c7
4 files changed, 12 insertions, 6 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);
     }
diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
index 66f3d3ad42..2d6e15c1d8 100644
--- a/nss/nss_files/files-alias.c
+++ b/nss/nss_files/files-alias.c
@@ -201,7 +201,7 @@ get_next_alias (const char *match, struct aliasent *result,
 	     lines until the next line containing the start of a new
 	     alias is found.  */
 	  ignore = (match != NULL
-		    && strcasecmp (result->alias_name, match) != 0);
+		    && __strcasecmp (result->alias_name, match) != 0);
 
 	  while (! ignore)
 	    {
diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
index 198b359b4c..dd5fdff645 100644
--- a/nss/nss_files/files-parse.c
+++ b/nss/nss_files/files-parse.c
@@ -235,7 +235,7 @@ parse_list (char *line, struct parser_data *data, size_t datalen, int *errnop)
 #define LOOKUP_NAME_CASE(nameelt, aliaselt)				      \
 {									      \
   char **ap;								      \
-  if (! strcasecmp (name, result->nameelt))				      \
+  if (! __strcasecmp (name, result->nameelt))				      \
     break;								      \
   for (ap = result->aliaselt; *ap; ++ap)				      \
     if (! strcasecmp (name, *ap))					      \
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 36c1d0035e..65da26b185 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -136,7 +136,8 @@ __nss_database_lookup (const char *database, const char *alternate_name,
 
 
 /* -1 == not found
-    0 == adjusted for next function */
+    0 == adjusted for next function
+    1 == finished */
 int
 __nss_lookup (service_user **ni, const char *fct_name, void **fctp)
 {
@@ -151,7 +152,7 @@ __nss_lookup (service_user **ni, const char *fct_name, void **fctp)
       *fctp = nss_lookup_function (*ni, fct_name);
     }
 
-  return *fctp != NULL ? 0 : -1;
+  return *fctp != NULL ? 0 : (*ni)->next == NULL ? 1 : -1;
 }