Join Nostr
2026-11-05 19:01:25 UTC

Phantasm on Nostr: Upon error, crypt_r, crypt_rn, and crypt_ra write an invalid hash to the output field ...

Upon error, crypt_r, crypt_rn, and crypt_ra write an invalid hash to the output field of their data argument, and crypt writes an invalid hash to its static storage area. This string will be shorter than 13 characters, will begin with a ‘*’, and will not compare equal to setting.

Upon error, crypt_rn and crypt_ra return a null pointer. crypt_r and crypt may also return a null pointer, or they may return a pointer to the invalid hash, depending on how libcrypt was configured. (The option to return the invalid hash is for compatibility with old applications that assume that crypt cannot return a null pointer. See “PORTABILITY NOTES” below.)
Sensible error handling is an insult in the Unix world. Yes, this is related to the musl/OpenSSH issue, musl instead returns on '*' apparently when it fails.