From ecabb2dce5a7e651664ddaf47385cd792fb53347 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 28 Dec 2004 23:59:22 +0000 Subject: r4385: Set the correct target service. Andrew Bartlett (This used to be commit 722f59c7c8d09f548d9325c6051d6687d7aa16c2) --- source4/libcli/ldap/ldap_client.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/libcli') 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", -- cgit