]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/passwd.c
add new ber dump routine (behind NEW_LOGGING)
[openldap] / servers / slapd / passwd.c
index 39ffb398bc194184d09485314faf25e2d37c7004..63110da27139c33830be51c5fdc79db42bb7c1ed 100644 (file)
@@ -224,8 +224,8 @@ slap_passwd_check(
        int     i;
        int result = 1;
 
-#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD )
-       ldap_pvt_thread_mutex_lock( &crypt_mutex );
+#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
+       ldap_pvt_thread_mutex_lock( &passwd_mutex );
 #ifdef SLAPD_SPASSWD
        lutil_passwd_sasl_conn = conn->c_sasl_context;
 #endif
@@ -238,7 +238,10 @@ slap_passwd_check(
                }
        }
 
-#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD )
+#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
+#ifdef SLAPD_SPASSWD
+       lutil_passwd_sasl_conn = NULL;
+#endif
        ldap_pvt_thread_mutex_unlock( &passwd_mutex );
 #endif
 
@@ -263,13 +266,13 @@ struct berval * slap_passwd_hash(
 
        struct berval *new;
 
-#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD )
+#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
        ldap_pvt_thread_mutex_lock( &passwd_mutex );
 #endif
 
        new = lutil_passwd_hash( cred , hash );
        
-#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD )
+#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
        ldap_pvt_thread_mutex_unlock( &passwd_mutex );
 #endif