News for hackers. Stuff that matters.
Re:Sshole by odo1242 on Thursday November 05, 2026 @12:34PM (#50381895)
Returning a string on error honestly is defensible, the question is why the string was “*” instead of like “crypt ERROR: input password cannot be longer than 256 characters” lol
Re:Sshole by dboreham on Thursday November 05, 2026 @01:21PM (#50382464)
Precisely.
Re:Sshole by mmoll on Thursday November 05, 2026 @01:49PM (#50382834)
No. Musl claims (claimed?) to be strictly POSIX compliant, and POSIX requires crypt to return NULL on errors.
Re:Sshole by tredre3 on Thursday November 05, 2026 @02:06PM (#50383029)
"*" is what's been historically used to represent an invalid/no value in passwd/shadow, so it makes some sense.

Of course given the chance that one might do a direct string comparison between crypt's return and the passwd/shadow file's hash field it was still a not well thought out choice.

Re:Sshole by gf000 on Thursday November 05, 2026 @02:21PM (#50383222)
No, it's absolutely not defensible.