Entry *e, user_entry;
Attribute *a;
backsql_srch_info bsi;
+ AttributeName anlist[2];
int rc;
Debug( LDAP_DEBUG_TRACE, "==>backsql_bind()\n", 0, 0, 0 );
/*
* method = LDAP_AUTH_SIMPLE
*/
- rs->sr_err = backsql_get_db_conn( op->o_bd, op->o_conn, &dbh );
+ rs->sr_err = backsql_get_db_conn( op, &dbh );
if (!dbh) {
Debug( LDAP_DEBUG_TRACE, "backsql_bind(): "
"could not get connection handle - exiting\n",
return 1;
}
- backsql_init_search( &bsi, bi, &op->o_req_ndn, LDAP_SCOPE_BASE,
- -1, -1, -1, NULL, dbh, op->o_bd, op->o_conn, op, NULL );
+ anlist[0].an_name = password->ad_cname;
+ anlist[0].an_desc = password;
+ anlist[1].an_name.bv_val = NULL;
+ backsql_init_search( &bsi, &op->o_req_ndn, LDAP_SCOPE_BASE,
+ -1, -1, -1, NULL, dbh, op, anlist );
e = backsql_id2entry( &bsi, &user_entry, &user_id );
if ( e == NULL ) {
Debug( LDAP_DEBUG_TRACE, "backsql_bind(): "
return 1;
}
- if ( slap_passwd_check( op->o_conn, a, &op->oq_bind.rb_cred ) != 0 ) {
+ if ( slap_passwd_check( op->o_conn, a, &op->oq_bind.rb_cred, &rs->sr_text ) != 0 ) {
rs->sr_err = LDAP_INVALID_CREDENTIALS;
send_ldap_result( op, rs );
return 1;