summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-12-28 23:59:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:41 -0500
commitecabb2dce5a7e651664ddaf47385cd792fb53347 (patch)
tree3492f1862b3f6e45de423a6eb637b3e27b73a6f5 /source4/libcli/ldap
parent2c1e008ee31d71ad777def834454b9cf9e2a715f (diff)
downloadsamba-ecabb2dce5a7e651664ddaf47385cd792fb53347.tar.gz
samba-ecabb2dce5a7e651664ddaf47385cd792fb53347.tar.bz2
samba-ecabb2dce5a7e651664ddaf47385cd792fb53347.zip
r4385: Set the correct target service.
Andrew Bartlett (This used to be commit 722f59c7c8d09f548d9325c6051d6687d7aa16c2)
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap_client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index a9b20b4ea8..b405b4f417 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -412,6 +412,13 @@ int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const cha
goto done;
}
+ status = gensec_set_target_service(conn->gensec, "ldap");
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("Failed to start set GENSEC target hostname: %s\n",
+ nt_errstr(status)));
+ goto done;
+ }
+
status = gensec_start_mech_by_sasl_name(conn->gensec, "GSS-SPNEGO");
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("Failed to start set GENSEC client SPNEGO mechanism: %s\n",