- /* get entry with reader lock */
- if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
- /* allow noauth binds */
- rc = 1;
- if ( method == LDAP_AUTH_SIMPLE ) {
- if( cred->bv_len == 0 ) {
- /* SUCCESS */
- send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL );
-
- } else if ( be_isroot_pw( be, dn, cred ) ) {
- *edn = ch_strdup( be_root_dn( be ) );
- rc = 0; /* front end will send result */
-
- } else {
- send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, NULL );
- }
+ if ( op->oq_bind.rb_method == LDAP_AUTH_SIMPLE && be_isroot_pw( op ) ) {
+ ber_dupbv( &op->oq_bind.rb_edn, be_root_dn( op->o_bd ) );
+ /* front end will send result */
+ return LDAP_SUCCESS;
+ }