summaryrefslogtreecommitdiff
path: root/usr/src/lib/libsldap
diff options
context:
space:
mode:
authormj162486 <none@none>2008-01-15 01:44:24 -0800
committermj162486 <none@none>2008-01-15 01:44:24 -0800
commit29680e551a97367a1d58ec0c94a967aa81fac54a (patch)
tree6691e04712fc1066b110c6f80a11a74162c8f607 /usr/src/lib/libsldap
parent14ef2b2fea9e423f002c19b37147ec95be3dbf51 (diff)
downloadillumos-gate-29680e551a97367a1d58ec0c94a967aa81fac54a.tar.gz
6649500 fix for CR 6617663 incomplete
Diffstat (limited to 'usr/src/lib/libsldap')
-rw-r--r--usr/src/lib/libsldap/common/ns_connect.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr/src/lib/libsldap/common/ns_connect.c b/usr/src/lib/libsldap/common/ns_connect.c
index 9474a66de2..3097edaad5 100644
--- a/usr/src/lib/libsldap/common/ns_connect.c
+++ b/usr/src/lib/libsldap/common/ns_connect.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -896,8 +896,13 @@ findConnection(int flags, const char *serverAddr,
return (-1);
*conp = NULL;
- /* if a new connection is requested, no need to continue */
- if (flags & NS_LDAP_NEW_CONN)
+ /*
+ * If a new connection is requested, no need to continue.
+ * If the process is not nscd and is not requesting keep connections
+ * alive, no need to continue.
+ */
+ if ((flags & NS_LDAP_NEW_CONN) || (!__s_api_nscd_proc() &&
+ !(flags & NS_LDAP_KEEP_CONN)))
return (-1);
#ifdef DEBUG