summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-02-26 12:25:34 +0000
committerVolker Lendecke <vlendec@samba.org>2006-02-26 12:25:34 +0000
commit8ed7c3ae37aecc8b32ed51c2157063d8dabc3cc1 (patch)
tree06750ab3e89533ec37935b08cd4e85b82ebc0de3
parentf945e0c7160ce248c30e8d7c5abbf7d1252fcd73 (diff)
downloadsamba-8ed7c3ae37aecc8b32ed51c2157063d8dabc3cc1.tar.gz
samba-8ed7c3ae37aecc8b32ed51c2157063d8dabc3cc1.tar.xz
samba-8ed7c3ae37aecc8b32ed51c2157063d8dabc3cc1.zip
r13693: More Solaris/LDAP fixes from Bjoern <bjoern@j3e.de>
-rw-r--r--source/include/includes.h6
-rw-r--r--source/lib/smbldap.c6
-rw-r--r--source/passdb/pdb_nds.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index 372744c8eaa..aef3437d567 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -474,6 +474,12 @@
#if defined(LDAP_SASL_BIND_INPROGRESS) && !defined(LDAP_SASL_BIND_IN_PROGRESS)
#define LDAP_SASL_BIND_IN_PROGRESS LDAP_SASL_BIND_INPROGRESS
#endif
+/* Solaris 8 defines SSL_LDAP_PORT, not LDAPS_PORT and it only does so if
+ LDAP_SSL is defined - but SSL is not working. We just want the
+ port number! Let's just define LDAPS_PORT correct. */
+#if !defined(LDAPS_PORT)
+#define LDAPS_PORT 636
+#endif
#else
#undef HAVE_LDAP
#endif
diff --git a/source/lib/smbldap.c b/source/lib/smbldap.c
index c045be51c5f..e54464a49be 100644
--- a/source/lib/smbldap.c
+++ b/source/lib/smbldap.c
@@ -999,7 +999,7 @@ static int smbldap_open(struct smbldap_state *ldap_state)
#endif
if (reopen) {
/* the other end has died. reopen. */
- ldap_unbind_ext(ldap_state->ldap_struct, NULL, NULL);
+ ldap_unbind(ldap_state->ldap_struct);
ldap_state->ldap_struct = NULL;
ldap_state->last_ping = (time_t)0;
} else {
@@ -1017,7 +1017,7 @@ static int smbldap_open(struct smbldap_state *ldap_state)
}
if ((rc = smbldap_connect_system(ldap_state, ldap_state->ldap_struct))) {
- ldap_unbind_ext(ldap_state->ldap_struct, NULL, NULL);
+ ldap_unbind(ldap_state->ldap_struct);
ldap_state->ldap_struct = NULL;
return rc;
}
@@ -1039,7 +1039,7 @@ static NTSTATUS smbldap_close(struct smbldap_state *ldap_state)
return NT_STATUS_INVALID_PARAMETER;
if (ldap_state->ldap_struct != NULL) {
- ldap_unbind_ext(ldap_state->ldap_struct, NULL, NULL);
+ ldap_unbind(ldap_state->ldap_struct);
ldap_state->ldap_struct = NULL;
}
diff --git a/source/passdb/pdb_nds.c b/source/passdb/pdb_nds.c
index 34e550d4139..a82f4e48d4e 100644
--- a/source/passdb/pdb_nds.c
+++ b/source/passdb/pdb_nds.c
@@ -819,7 +819,7 @@ static NTSTATUS pdb_nds_update_login_attempts(struct pdb_methods *methods,
rc = ldap_simple_bind_s(ld, dn, clear_text_pw);
if (rc == LDAP_SUCCESS) {
DEBUG(5,("pdb_nds_update_login_attempts: ldap_simple_bind_s Successful for %s\n", username));
- ldap_unbind_ext(ld, NULL, NULL);
+ ldap_unbind(ld);
} else {
NTSTATUS nt_status = NT_STATUS_ACCOUNT_RESTRICTION;
DEBUG(5,("pdb_nds_update_login_attempts: ldap_simple_bind_s Failed for %s\n", username));