about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--nss/nsswitch.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 402b31bc83..619f629531 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-26  Ulrich Drepper  <drepper@redhat.com>
+
+	* nss/nsswitch.c (__nss_lookup): Actually use alternative name in
+	second lookup.
+
 2007-12-23  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/x86_64/cacheinfo.c (intel_02_known): New entry 0x3f.
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 28aa1b4f34..c0b661feb3 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -150,7 +150,7 @@ __nss_lookup (service_user **ni, const char *fct_name, const char *fct2_name,
 {
   *fctp = __nss_lookup_function (*ni, fct_name);
   if (*fctp == NULL && fct2_name != NULL)
-    *fctp = __nss_lookup_function (*ni, fct_name);
+    *fctp = __nss_lookup_function (*ni, fct2_name);
 
   while (*fctp == NULL
 	 && nss_next_action (*ni, NSS_STATUS_UNAVAIL) == NSS_ACTION_CONTINUE
@@ -160,7 +160,7 @@ __nss_lookup (service_user **ni, const char *fct_name, const char *fct2_name,
 
       *fctp = __nss_lookup_function (*ni, fct_name);
       if (*fctp == NULL && fct2_name != NULL)
-	*fctp = __nss_lookup_function (*ni, fct_name);
+	*fctp = __nss_lookup_function (*ni, fct2_name);
     }
 
   return *fctp != NULL ? 0 : (*ni)->next == NULL ? 1 : -1;