freebsd-dev/lib/libcrypt
Ed Schouten 5f521d7ba7 Make libcrypt thread-safe. Add crypt_r(3).
glibc has a pretty nice function called crypt_r(3), which is nothing
more than crypt(3), but thread-safe. It accomplishes this by introducing
a 'struct crypt_data' structure that contains a buffer that is large
enough to hold the resulting string.

Let's go ahead and also add this function. It would be a shame if a
useful function like this wouldn't be usable in multithreaded apps.
Refactor crypt.c and all of the backends to no longer declare static
arrays, but write their output in a provided buffer.

There is no need to do any buffer length computation here, as we'll just
need to ensure that 'struct crypt_data' is large enough, which it is.
_PASSWORD_LEN is defined to 128 bytes, but in this case I'm picking 256,
as this is going to be part of the actual ABI.

Differential Revision:	https://reviews.freebsd.org/D7306
2016-08-10 15:16:28 +00:00
..
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
crypt-md5.c Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
crypt-nthash.c Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
crypt-sha256.c Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
crypt-sha512.c Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
crypt.3 Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
crypt.c Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
crypt.h Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
Makefile Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00
Makefile.depend META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
misc.c Make libcrypt thread-safe. Add crypt_r(3). 2016-08-10 15:16:28 +00:00