]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/bind.c
Notices and acknowledgements
[openldap] / servers / slapd / back-ldbm / bind.c
index 81192924fef9a26e6ff7291a9f2373a072d05fed..e84935af0ec5ec862a4916005852377a9e7ea399 100644 (file)
@@ -81,11 +81,9 @@ ldbm_back_bind(
 
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
                if ( rs->sr_matched ) free( (char *)rs->sr_matched );
-#ifdef LDAP_SYNCREPL
+               rs->sr_ref = NULL;
+               rs->sr_matched = NULL;
                return rs->sr_err;
-#else
-               return( rc );
-#endif
        }
 
        ber_dupbv( &op->oq_bind.rb_edn, &e->e_name );
@@ -103,6 +101,7 @@ ldbm_back_bind(
 #endif
                rs->sr_err = LDAP_INVALID_CREDENTIALS;
                send_ldap_result( op, rs );
+               rc = LDAP_INVALID_CREDENTIALS;
                goto return_results;
        }
 #endif
@@ -121,11 +120,7 @@ ldbm_back_bind(
                send_ldap_error( op, rs, LDAP_ALIAS_PROBLEM,
                    "entry is alias" );
 
-#ifdef LDAP_SYNCREPL
                rc = LDAP_ALIAS_PROBLEM;
-#else
-               rc = 1;
-#endif
                goto return_results;
        }
 
@@ -152,12 +147,9 @@ ldbm_back_bind(
                send_ldap_result( op, rs );
 
                ber_bvarray_free( rs->sr_ref );
-
-#ifdef LDAP_SYNCREPL
+               rs->sr_matched = NULL;
+               rs->sr_ref = NULL;
                rc = rs->sr_err;
-#else
-               rc = 1;
-#endif
                goto return_results;
        }
 
@@ -167,11 +159,7 @@ ldbm_back_bind(
                        password, NULL, ACL_AUTH, NULL ) )
                {
                        send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
-#ifdef LDAP_SYNCREPL
                        rc = LDAP_INSUFFICIENT_ACCESS;
-#else
-                       rc = 1;
-#endif
                        goto return_results;
                }
 
@@ -179,22 +167,14 @@ ldbm_back_bind(
                        send_ldap_error( op, rs, LDAP_INAPPROPRIATE_AUTH, NULL );
 
                        /* stop front end from sending result */
-#ifdef LDAP_SYNCREPL
                        rc = LDAP_INAPPROPRIATE_AUTH;
-#else
-                       rc = 1;
-#endif
                        goto return_results;
                }
 
                if ( slap_passwd_check( op->o_conn, a, &op->oq_bind.rb_cred, &rs->sr_text ) != 0 ) {
                        send_ldap_error( op, rs, LDAP_INVALID_CREDENTIALS, NULL );
                        /* stop front end from sending result */
-#ifdef LDAP_SYNCREPL
                        rc = LDAP_INVALID_CREDENTIALS;
-#else
-                       rc = 1;
-#endif
                        goto return_results;
                }
 
@@ -205,11 +185,7 @@ ldbm_back_bind(
        case LDAP_AUTH_KRBV41:
                if ( krbv4_ldap_auth( op->o_bd, &op->oq_bind.rb_cred, &ad ) != LDAP_SUCCESS ) {
                        send_ldap_error( op, rs, LDAP_INVALID_CREDENTIALS, NULL );
-#ifdef LDAP_SYNCREPL
                        rc = LDAP_INVALID_CREDENTIALS;
-#else
-                       rc = 1;
-#endif
                        goto return_results;
                }
 
@@ -218,11 +194,7 @@ ldbm_back_bind(
                {
                        send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS,
                                NULL );
-#ifdef LDAP_SYNCREPL
                        rc = LDAP_INSUFFICIENT_ACCESS;
-#else
-                       rc = 1;
-#endif
                        goto return_results;
                }
 
@@ -238,11 +210,7 @@ ldbm_back_bind(
                                break;
                        }
                        send_ldap_error( op, rs, LDAP_INAPPROPRIATE_AUTH, NULL );
-#ifdef LDAP_SYNCREPL
                        rc = LDAP_INAPPROPRIATE_AUTH;
-#else
-                       rc = 1;
-#endif
                        goto return_results;
 
                } else {        /* look for krbname match */
@@ -254,11 +222,7 @@ ldbm_back_bind(
                        if ( value_find( a->a_desc, a->a_vals, &krbval ) != 0 ) {
                                send_ldap_error( op, rs,
                                    LDAP_INVALID_CREDENTIALS, NULL );
-#ifdef LDAP_SYNCREPL
                                rc = LDAP_INVALID_CREDENTIALS;
-#else
-                               rc = 1;
-#endif
                                goto return_results;
                        }
                }
@@ -276,11 +240,7 @@ ldbm_back_bind(
        default:
                send_ldap_error( op, rs, LDAP_STRONG_AUTH_NOT_SUPPORTED,
                    "authentication method not supported" );
-#ifdef LDAP_SYNCREPL
                rc = LDAP_STRONG_AUTH_NOT_SUPPORTED;
-#else
-               rc = 1;
-#endif
                goto return_results;
        }