about summary refs log tree commit diff
path: root/nss
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-26 16:45:03 +0000
committerUlrich Drepper <drepper@redhat.com>2009-04-26 16:45:03 +0000
commit4ec77f72fe0978027fb3f35eb0eb0078f24f4b2b (patch)
treec0b1eb1d444855423b88573351ebbad6ad63812f /nss
parent82a1a4dae1b699a394e213866e789eacef1728fc (diff)
downloadglibc-4ec77f72fe0978027fb3f35eb0eb0078f24f4b2b.tar.gz
glibc-4ec77f72fe0978027fb3f35eb0eb0078f24f4b2b.tar.xz
glibc-4ec77f72fe0978027fb3f35eb0eb0078f24f4b2b.zip
* nss/nsswitch.c (__nss_lookup_function): En/Decrypt cached
	function pointers.
Diffstat (limited to 'nss')
-rw-r--r--nss/nsswitch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index c0b661feb3..da94ca9838 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999, 2001-2007, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -300,8 +300,11 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
 
   found = __tsearch (&fct_name, &ni->known, &known_compare);
   if (*found != &fct_name)
-    /* The search found an existing structure in the tree.  */
-    result = ((known_function *) *found)->fct_ptr;
+    {
+      /* The search found an existing structure in the tree.  */
+      result = ((known_function *) *found)->fct_ptr;
+      PTR_DEMANGLE (result);
+    }
   else
     {
       /* This name was not known before.  Now we have a node in the tree
@@ -424,6 +427,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
 	  /* Remember function pointer for later calls.  Even if null, we
 	     record it so a second try needn't search the library again.  */
 	  known->fct_ptr = result;
+	  PTR_MANGLE (known->fct_ptr);
 	}
     }