summaryrefslogtreecommitdiff
path: root/nscd/nscd_gethst_r.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-01-02 21:14:11 +0000
committerJakub Jelinek <jakub@redhat.com>2009-01-02 21:14:11 +0000
commite3e60f6bdc80109e6cfbd092049a4bbb2f43c457 (patch)
treed166064d5e5bfd7821e133a5c76d8aae50d81766 /nscd/nscd_gethst_r.c
parent033b8b2d4de5cd8abe4278cd2b30c50d7a78e886 (diff)
Updated to fedora-glibc-20090102T2110cvs/fedora-glibc-2_9_90-1
Diffstat (limited to 'nscd/nscd_gethst_r.c')
-rw-r--r--nscd/nscd_gethst_r.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index a211404756..aea8288594 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -97,12 +97,25 @@ libc_freeres_fn (hst_map_free)
}
+int __nss_have_localdomain attribute_hidden;
+
static int
internal_function
nscd_gethst_r (const char *key, size_t keylen, request_type type,
struct hostent *resultbuf, char *buffer, size_t buflen,
struct hostent **result, int *h_errnop)
{
+ if (__builtin_expect (__nss_have_localdomain >= 0, 0))
+ {
+ if (__nss_have_localdomain == 0)
+ __nss_have_localdomain = getenv ("LOCALDOMAIN") != NULL ? 1 : -1;
+ if (__nss_have_localdomain > 0)
+ {
+ __nss_not_use_nscd_hosts = 1;
+ return -1;
+ }
+ }
+
int gc_cycle;
int nretries = 0;