- /* allow noauth binds */
- rc = 1;
- if ( method == LDAP_AUTH_SIMPLE ) {
- if ( be_isroot_pw( be, conn, ndn, cred ) ) {
- *edn = ch_strdup( be_root_dn( be ) );
- rc = LDAP_SUCCESS; /* front end will send result */
-
- } else if ( refs != NULL ) {
- send_ldap_result( conn, op, rc = LDAP_REFERRAL,
- matched_dn, NULL, refs, NULL );
-
- } else {
- send_ldap_result( conn, op, rc = LDAP_INVALID_CREDENTIALS,
- NULL, NULL, NULL, NULL );
- }
+ rs->sr_err = LDAP_INVALID_CREDENTIALS;
+ send_ldap_result( op, rs );