From: Kurt Zeilenga Date: Mon, 9 Oct 2000 19:09:28 +0000 (+0000) Subject: Fix SLAPD_SPASSWD typo which caused passwd_mutex not to be used X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1796 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c42c2847cf4ad818df2f67fb2833293a84453cda;p=openldap Fix SLAPD_SPASSWD typo which caused passwd_mutex not to be used consistently. --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 8f061ffff1..8aca7e0e1e 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -519,7 +519,7 @@ be_isroot_pw( Backend *be, return 0; } -#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD ) +#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; @@ -528,7 +528,7 @@ be_isroot_pw( Backend *be, result = lutil_passwd( &be->be_root_pw, cred, NULL ); -#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD ) +#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD ) #ifdef SLAPD_SPASSWD lutil_passwd_sasl_conn = NULL; #endif diff --git a/servers/slapd/init.c b/servers/slapd/init.c index 69f64d4b7a..fe57be4c20 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -40,7 +40,7 @@ char **g_argv; */ ldap_pvt_thread_pool_t connection_pool; ldap_pvt_thread_mutex_t gmtime_mutex; -#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD ) +#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD ) ldap_pvt_thread_mutex_t passwd_mutex; #endif @@ -103,7 +103,7 @@ slap_init( int mode, const char *name ) ldap_pvt_thread_mutex_init( &num_sent_mutex ); ldap_pvt_thread_mutex_init( &gmtime_mutex ); -#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD ) +#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD ) ldap_pvt_thread_mutex_init( &passwd_mutex ); #endif diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c index 381fb088fd..63110da271 100644 --- a/servers/slapd/passwd.c +++ b/servers/slapd/passwd.c @@ -224,7 +224,7 @@ slap_passwd_check( int i; int result = 1; -#if defined( SLAPD_CRYPT ) || defined( SLAPD_PASSWD ) +#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; @@ -238,7 +238,7 @@ 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 @@ -266,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