#endif
}
- Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d BIND dn=\"%s\" method=%ld\n",
+ Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu BIND dn=\"%s\" method=%ld\n",
op->o_connid, op->o_opid, pdn.bv_val, (unsigned long) method, 0 );
if ( version < LDAP_VERSION_MIN || version > LDAP_VERSION_MAX ) {
}
/* check restrictions */
- rc = backend_check_restrictions( NULL, conn, op, mech.bv_val, &text );
+ rc = backend_check_restrictions( NULL, conn, op, &mech, &text );
if( rc != LDAP_SUCCESS ) {
send_ldap_result( conn, op, rc,
NULL, text, NULL, NULL );
text = "anonymous bind disallowed";
} else {
- rc = backend_check_restrictions( NULL, conn, op, mech.bv_val, &text );
+ rc = backend_check_restrictions( NULL, conn, op,
+ &mech, &text );
}
/*
goto cleanup;
}
- conn->c_authz_backend = be;
-
if ( be->be_bind ) {
int ret;
if ( ret == 0 ) {
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
+ if( conn->c_authz_backend == NULL ) {
+ conn->c_authz_backend = be;
+ }
+
if(edn.bv_len) {
conn->c_dn = edn;
} else {
- ber_dupbv( &conn->c_dn, &pdn );
+ conn->c_dn = pdn;
+ pdn.bv_val = NULL;
+ pdn.bv_len = 0;
}
- conn->c_cdn = pdn;
- pdn.bv_val = NULL;
- pdn.bv_len = 0;
conn->c_ndn = ndn;
ndn.bv_val = NULL;
#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.bv_val, conn->c_dn.bv_val ));
+ conn->c_connid, version, dn.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.bv_val, conn->c_dn.bv_val );
+ version, dn.bv_val, conn->c_dn.bv_val );
#endif
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );