]> git.sur5r.net Git - openldap/commitdiff
Fix GSSAPI connections to localhost
authorHoward Chu <hyc@openldap.org>
Mon, 10 Nov 2003 20:58:29 +0000 (20:58 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 10 Nov 2003 20:58:29 +0000 (20:58 +0000)
libraries/libldap/cyrus.c

index 121fb424eb1f5f726d58de7a51937c005a5464e0..5c70c5ec46e0a5ac06097ab9fe405ace40279dd5 100644 (file)
@@ -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;