]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/bind.c
Import slapd.conf mode change (with typo correction) from -devel.
[openldap] / servers / slapd / back-ldbm / bind.c
index 1bec9e53bdf6d55bb484f7895c64d4711c088795..23bb40491ab97658c6fb056cfe614102083c2e67 100644 (file)
@@ -19,8 +19,6 @@
 extern int     krbv4_ldap_auth();
 #endif
 
-pthread_mutex_t crypt_mutex;
-
 static int
 crypted_value_find(
        struct berval       **vals,
@@ -35,13 +33,17 @@ crypted_value_find(
                if ( syntax != SYNTAX_BIN ) {
                        int result;
 
+#ifdef SLAPD_CRYPT
                        pthread_mutex_lock( &crypt_mutex );
+#endif
 
                        result = lutil_passwd(
                                (char*) cred->bv_val,
                                (char*) vals[i]->bv_val);
 
+#ifdef SLAPD_CRYPT
                        pthread_mutex_unlock( &crypt_mutex );
+#endif
 
                        return result;
 
@@ -182,6 +184,7 @@ ldbm_back_bind(
                                goto return_results;
                        }
                }
+               rc = 0;
                break;
 
        case LDAP_AUTH_KRBV42: