summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-01 19:25:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:17 -0500
commit4fe9d1f89794ab4576baebe1ba6038d0ca9c8ddb (patch)
tree71b074259952bc33585ea412abf8aae9d82b9ecb
parent5c9e031adb4e1833337679d37f75a3d23fd91ff1 (diff)
downloadsamba-4fe9d1f89794ab4576baebe1ba6038d0ca9c8ddb.tar.gz
samba-4fe9d1f89794ab4576baebe1ba6038d0ca9c8ddb.tar.bz2
samba-4fe9d1f89794ab4576baebe1ba6038d0ca9c8ddb.zip
r15995: Make smbldap obey config tests. Patch from "John E. Malmberg"
<wb8tyw@qsl.net>. Jeremy. (This used to be commit 93dd476a9108adde42de422e1886bbaee75b952b)
-rw-r--r--source3/lib/smbldap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c
index bca984444d..dfa6782afe 100644
--- a/source3/lib/smbldap.c
+++ b/source3/lib/smbldap.c
@@ -944,6 +944,7 @@ static int smbldap_connect_system(struct smbldap_state *ldap_state, LDAP * ldap_
DEBUG(10,("ldap_connect_system: Binding to ldap server %s as \"%s\"\n",
ldap_state->uri, ldap_dn));
+#ifdef HAVE_LDAP_SET_REBIND_PROC
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000)
# if LDAP_SET_REBIND_PROC_ARGS == 2
ldap_set_rebind_proc(ldap_struct, &rebindproc_connect);
@@ -959,6 +960,7 @@ static int smbldap_connect_system(struct smbldap_state *ldap_state, LDAP * ldap_
ldap_set_rebind_proc(ldap_struct, &rebindproc_with_state, (void *)ldap_state);
# endif
#endif /*defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000)*/
+#endif
rc = ldap_simple_bind_s(ldap_struct, ldap_dn, ldap_secret);
@@ -1009,7 +1011,11 @@ static int smbldap_open(struct smbldap_state *ldap_state)
if ((ldap_state->ldap_struct != NULL) && ((ldap_state->last_ping + SMBLDAP_DONT_PING_TIME) < time(NULL))) {
+#ifdef HAVE_UNIXSOCKET
struct sockaddr_un addr;
+#else
+ struct sockaddr addr;
+#endif
socklen_t len = sizeof(addr);
int sd;