This code was originally written for non-reentrant crypt(3).
In 5f521d7ba7, a thread-safe crypt_r(3) was introduced. However,
it looks like the DES implementation is still not re-entrant;
routines like setup_salt() or des_setkey() still use global
Instead of something drastic, eg removing DES support altogether,
just mark those variables as thread-local. This adds about 30kB
of data per thread.
Given that this only applies to DES, I think the impact is minimal.
Reviewed By: markj
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D30674