#endif
rs->sr_err = LDAP_INVALID_CREDENTIALS;
- send_ldap_result( op, rs );
-
goto done;
}
#endif
0, 0 );
#endif
- send_ldap_error( op, rs, LDAP_ALIAS_PROBLEM, "entry is alias");
-
+ rs->sr_err = LDAP_ALIAS_PROBLEM;
+ rs->sr_text = "entry is alias";
goto done;
}
#endif
if( rs->sr_ref != NULL ) {
rs->sr_err = LDAP_REFERRAL;
- rs->sr_matched = e->e_name.bv_val;
- send_ldap_result( op, rs );
- ber_bvarray_free( rs->sr_ref );
- rs->sr_ref = NULL;
- rs->sr_matched = NULL;
} else {
rs->sr_err = LDAP_INVALID_CREDENTIALS;
- send_ldap_result( op, rs );
}
-
goto done;
}
password, NULL, ACL_AUTH, NULL );
if ( ! rs->sr_err ) {
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
- send_ldap_result( op, rs );
goto done;
}
if ( (a = attr_find( e->e_attrs, password )) == NULL ) {
rs->sr_err = LDAP_INAPPROPRIATE_AUTH;
- send_ldap_result( op, rs );
goto done;
}
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 );
goto done;
}
case LDAP_AUTH_KRBV41:
if ( krbv4_ldap_auth( op->o_bd, &op->oq_bind.rb_cred, &ad ) != LDAP_SUCCESS ) {
rs->sr_err = LDAP_INVALID_CREDENTIALS,
- send_ldap_result( op );
goto done;
}
krbattr, NULL, ACL_AUTH, NULL );
if ( ! rs->sr_err ) {
rs->sr_err = LDAP_INSUFFICIENT_ACCESS,
- send_ldap_result( op );
goto done;
}
break;
}
rs->sr_err = LDAP_INAPPROPRIATE_AUTH,
- send_ldap_result( op );
goto done;
} else { /* look for krbname match */
if ( value_find( a->a_desc, a->a_vals, &krbval ) != 0 ) {
rs->sr_err = LDAP_INVALID_CREDENTIALS;
- send_ldap_result( op );
goto done;
}
}
break;
case LDAP_AUTH_KRBV42:
- send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
- "Kerberos bind step 2 not supported" );
+ rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
+ rs->sr_text = "Kerberos bind step 2 not supported";
goto done;
#endif
default:
- send_ldap_error( op, rs, LDAP_STRONG_AUTH_NOT_SUPPORTED,
- "authentication method not supported" );
- goto done;
+ rs->sr_err = LDAP_STRONG_AUTH_NOT_SUPPORTED;
+ rs->sr_text = "authentication method not supported";
}
done:
LOCK_ID_FREE(bdb->bi_dbenv, locker);
+ if ( rs->sr_err ) {
+ send_ldap_result( op, rs );
+ if ( rs->sr_ref ) {
+ ber_bvarray_free( rs->sr_ref );
+ rs->sr_ref = NULL;
+ }
+ }
/* front end will send result on success (rs->sr_err==0) */
return rs->sr_err;
}