From: Kurt Zeilenga Date: Mon, 20 Jan 2003 22:37:42 +0000 (+0000) Subject: Return the Start TLS error. X-Git-Tag: NO_SLAP_OP_BLOCKS~582 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b5594b2750b2b695f7c1604b2f3f3352bcd3cfcd;p=openldap Return the Start TLS error. --- diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index c2efec4bae..7e4d4de498 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -847,8 +847,7 @@ do_bind( ldap_set_option(ri->ri_ldp, LDAP_OPT_RESTART, LDAP_OPT_ON); if( ri->ri_tls ) { - int err; - err = ldap_start_tls_s(ri->ri_ldp, NULL, NULL); + int err = ldap_start_tls_s(ri->ri_ldp, NULL, NULL); if( err != LDAP_SUCCESS ) { #ifdef NEW_LOGGING @@ -864,6 +863,7 @@ do_bind( #endif if( ri->ri_tls == TLS_CRITICAL ) { + *lderr = err; ldap_unbind( ri->ri_ldp ); ri->ri_ldp = NULL; return BIND_ERR_TLS_FAILED; @@ -919,9 +919,8 @@ do_bind( #ifdef HAVE_CYRUS_SASL if( ri->ri_secprops != NULL ) { - int err; - err = ldap_set_option(ri->ri_ldp, LDAP_OPT_X_SASL_SECPROPS, - ri->ri_secprops); + int err = ldap_set_option(ri->ri_ldp, + LDAP_OPT_X_SASL_SECPROPS, ri->ri_secprops); if( err != LDAP_OPT_SUCCESS ) { #ifdef NEW_LOGGING