aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_user.c')
-rw-r--r--src/os/unix/ngx_user.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c
index 4ac969fd9..27c76ef80 100644
--- a/src/os/unix/ngx_user.c
+++ b/src/os/unix/ngx_user.c
@@ -64,16 +64,6 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
size_t len;
ngx_err_t err;
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
-
- /* crypt() is a time consuming function, so we only try to lock */
-
- if (ngx_mutex_trylock(ngx_crypt_mutex) != NGX_OK) {
- return NGX_AGAIN;
- }
-
-#endif
-
value = crypt((char *) key, (char *) salt);
if (value) {
@@ -81,25 +71,15 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
*encrypted = ngx_pnalloc(pool, len);
if (*encrypted == NULL) {
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
- ngx_mutex_unlock(ngx_crypt_mutex);
-#endif
return NGX_ERROR;
}
ngx_memcpy(*encrypted, value, len);
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
- ngx_mutex_unlock(ngx_crypt_mutex);
-#endif
return NGX_OK;
}
err = ngx_errno;
-#if (NGX_OLD_THREADS && NGX_NONREENTRANT_CRYPT)
- ngx_mutex_unlock(ngx_crypt_mutex);
-#endif
-
ngx_log_error(NGX_LOG_CRIT, pool->log, err, "crypt() failed");
return NGX_ERROR;