comparison src/os/unix/ngx_user.c @ 7407:b1a166ab7f04 stable-1.14

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 23 May 2018 16:38:16 +0300
parents 4a670c18e5e6
children
comparison
equal deleted inserted replaced
7406:ed5b3c4c1284 7407:b1a166ab7f04
19 char *value; 19 char *value;
20 size_t len; 20 size_t len;
21 struct crypt_data cd; 21 struct crypt_data cd;
22 22
23 cd.initialized = 0; 23 cd.initialized = 0;
24 #ifdef __GLIBC__
25 /* work around the glibc bug */
26 cd.current_salt[0] = ~salt[0];
27 #endif
28 24
29 value = crypt_r((char *) key, (char *) salt, &cd); 25 value = crypt_r((char *) key, (char *) salt, &cd);
30 26
31 if (value) { 27 if (value) {
32 len = ngx_strlen(value) + 1; 28 len = ngx_strlen(value) + 1;