* }
*/
- tag = ber_scanf( ber, "{iot" /*}*/, &version, &dn, &method );
+ tag = ber_scanf( ber, "{imt" /*}*/, &version, &dn, &method );
if ( tag == LBER_ERROR ) {
#ifdef NEW_LOGGING
op->o_protocol = version;
if( method != LDAP_AUTH_SASL ) {
- tag = ber_scanf( ber, /*{*/ "o}", &cred );
+ tag = ber_scanf( ber, /*{*/ "m}", &cred );
} else {
tag = ber_scanf( ber, "{a" /*}*/, &mech );
tag = ber_peek_tag( ber, &len );
if ( tag == LDAP_TAG_LDAPCRED ) {
- tag = ber_scanf( ber, "o", &cred );
+ tag = ber_scanf( ber, "m", &cred );
} else {
tag = LDAP_TAG_LDAPCRED;
cred.bv_val = NULL;
goto cleanup;
}
- if( mech == NULL || *mech == '\0' ) {
+ if( mech == NULL || mech[0] == '\0' ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
"do_bind: conn %d no SASL mechanism provided\n",
if ( (be = select_backend( &ndn, 0, 0 )) == NULL ) {
if ( default_referral ) {
- BVarray ref = referral_rewrite( default_referral,
+ BerVarray ref = referral_rewrite( default_referral,
NULL, &pdn, LDAP_SCOPE_DEFAULT );
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
NULL, NULL, ref ? ref : default_referral, NULL );
- bvarray_free( ref );
+ ber_bvarray_free( ref );
} else {
/* noSuchObject is not allowed to be returned by bind */
} else {
ber_dupbv( &conn->c_dn, &pdn );
}
- conn->c_cdn = pdn.bv_val;
+ conn->c_cdn = pdn;
pdn.bv_val = NULL;
pdn.bv_len = 0;
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_DETAIL1,
"do_bind: conn %d v%d bind: \"%s\" to \"%s\" \n",
- conn->c_connid, version, conn->c_cdn, conn->c_dn.bv_val ));
+ conn->c_connid, version, conn->c_cdn.bv_val, conn->c_dn.bv_val ));
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: v%d bind: \"%s\" to \"%s\"\n",
- version, conn->c_cdn, conn->c_dn.bv_val );
+ version, conn->c_cdn.bv_val, conn->c_dn.bv_val );
#endif
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
}
cleanup:
- free( dn.bv_val );
if( pdn.bv_val != NULL ) {
free( pdn.bv_val );
}
if ( mech != NULL ) {
free( mech );
}
- if ( cred.bv_val != NULL ) {
- free( cred.bv_val );
- }
return rc;
}