Welcome! Log In Create A New Profile


[nginx] Removed glibc crypt_r() bug workaround (ticket #1469).

Maxim Dounin
December 04, 2018 08:38AM
details: https://hg.nginx.org/nginx/rev/b1a166ab7f04
branches: stable-1.14
changeset: 7407:b1a166ab7f04
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed May 23 16:38:16 2018 +0300
Removed glibc crypt_r() bug workaround (ticket #1469).

The bug in question was fixed in glibc 2.3.2 and is no longer expected
to manifest itself on real servers. On the other hand, the workaround
causes compilation problems on various systems. Previously, we've
already fixed the code to compile with musl libc (fd6fd02f6a4d), and
now it is broken on Fedora 28 where glibc's crypt library was replaced
by libxcrypt. So the workaround was removed.


src/os/unix/ngx_user.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diffs (14 lines):

diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c
--- a/src/os/unix/ngx_user.c
+++ b/src/os/unix/ngx_user.c
@@ -21,10 +21,6 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char
struct crypt_data cd;

cd.initialized = 0;
-#ifdef __GLIBC__
- /* work around the glibc bug */
- cd.current_salt[0] = ~salt[0];

value = crypt_r((char *) key, (char *) salt, &cd);

nginx-devel mailing list
Subject Author Views Posted

[nginx] Removed glibc crypt_r() bug workaround (ticket #1469).

Maxim Dounin 155 December 04, 2018 08:38AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 84
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready