From: Howard Chu Date: Mon, 10 Nov 2003 20:58:29 +0000 (+0000) Subject: Fix GSSAPI connections to localhost X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~457 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=838c2d774efd76eca7c1202963a50e5dbc052c20;p=openldap Fix GSSAPI connections to localhost --- 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;