Welcome! Log In Create A New Profile

Advanced

Re: "bug in glibc"

March 31, 2013 11:14AM
On Mar 31, 2013, at 14:33 , Justin Cormack wrote:

> There is a note in src/os/unix/ngx_user.c about a bug in glibc for crypt_r:
>
> /* work around the glibc bug */
> cd.current_salt[0] = ~salt[0];
>
> value = crypt_r((char *) key, (char *) salt, &cd);
>
> I was wondering if anyone knew what the bug was, as I am running on a platform (Musl libc) that has got NGX_HAVE_GNU_CRYPT_R but has a different implementation, in particular has no current_salt field in struct crypt_data (and indeed the man page says you should treat it as opaque except for the initialized field).
>
> I was wondering exactly what the bug was as then I could write a test for it rather than always including this code; I have not been able to find it in the glibc bug tracker though.


2002-10-29 Daniel Jacobowitz <drow@mvista.com>

* crypt/crypt_util.c (__init_des_r): Initialize current_salt
and current_saltbits.

https://groups.google.com/forum/?fromgroups=#!topic/linux.debian.maint.glibc/Q88bwAp222w


--
Igor Sysoev
http://nginx.com/services.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

"bug in glibc"

Justin Cormack March 31, 2013 06:36AM

Re: "bug in glibc"

Igor Sysoev March 31, 2013 11:14AM

Re: "bug in glibc"

Justin Cormack March 31, 2013 05:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 116
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready