about summary refs log tree commit diff
path: root/nss/getXXbyYY_r.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-08-11 07:25:02 -0700
committerUlrich Drepper <drepper@redhat.com>2010-08-11 07:25:02 -0700
commitc3e2f19bb995a0281f4cc56ad81bd67a5404dde6 (patch)
tree5bdbd8e1cb8119cd07cb48c60ef4f383c6b2d875 /nss/getXXbyYY_r.c
parentf15ce4d8dc139523fe0c273580b604b2453acba6 (diff)
downloadglibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.tar.gz
glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.tar.xz
glibc-c3e2f19bb995a0281f4cc56ad81bd67a5404dde6.zip
Add self-contained test for NSS.
While at it fix interaction between __nss_configure_lookup and nscd.
Otherwise the test fails if nscd is runnung.
Diffstat (limited to 'nss/getXXbyYY_r.c')
-rw-r--r--nss/getXXbyYY_r.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 16dadd70ef..0dbb0030e9 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -87,6 +87,8 @@
 # define NOT_USENSCD_NAME ADD_NOT_NSCDUSE (DATABASE_NAME)
 # define ADD_NOT_NSCDUSE(name) ADD_NOT_NSCDUSE1 (name)
 # define ADD_NOT_NSCDUSE1(name) __nss_not_use_nscd_##name
+# define CONCAT2(arg1, arg2) CONCAT2_2 (arg1, arg2)
+# define CONCAT2_2(arg1, arg2) arg1##arg2
 #endif
 
 #define FUNCTION_NAME_STRING STRINGIZE (FUNCTION_NAME)
@@ -186,7 +188,8 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
   if (NOT_USENSCD_NAME > 0 && ++NOT_USENSCD_NAME > NSS_NSCD_RETRY)
     NOT_USENSCD_NAME = 0;
 
-  if (!NOT_USENSCD_NAME)
+  if (!NOT_USENSCD_NAME
+      && !__nss_database_custom[CONCAT2 (NSS_DBSIDX_, DATABASE_NAME)])
     {
       nscd_status = NSCD_NAME (ADD_VARIABLES, resbuf, buffer, buflen, result
 			       H_ERRNO_VAR);