From 838c2d774efd76eca7c1202963a50e5dbc052c20 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 10 Nov 2003 20:58:29 +0000 Subject: [PATCH] Fix GSSAPI connections to localhost --- libraries/libldap/cyrus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 121fb424eb..5c70c5ec46 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -598,9 +598,10 @@ ldap_int_sasl_bind( ld->ld_defconn->lconn_sasl_authctx = NULL; } - rc = ldap_int_sasl_open( ld, ld->ld_defconn, - ld->ld_defconn->lconn_server->lud_host ? - ld->ld_defconn->lconn_server->lud_host : "localhost" ); + { char *saslhost = ldap_host_connected_to( ld->ld_sb, "localhost" ); + rc = ldap_int_sasl_open( ld, ld->ld_defconn, saslhost ); + LDAP_FREE( saslhost ); + } if ( rc != LDAP_SUCCESS ) return rc; -- 2.39.5