]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/chkhash.c: is_valid_hash(): Accept an empty hash
authorAlejandro Colomar <alx@kernel.org>
Thu, 15 Jan 2026 00:11:52 +0000 (01:11 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 16 Jan 2026 00:42:57 +0000 (01:42 +0100)
commitb323141ee90f0c87d2cadfab25e21ae71da20fd8
treec72143bc8790f0b3de9adefd07206a889bbdd496
parenta49d2acdb4b59b1f854dc29ac304fd2836d7e1eb
lib/chkhash.c: is_valid_hash(): Accept an empty hash

It represents a passwordless account.
That is discouraged, but accepted.

Fixes: c44f1e096a19 (2025-07-20; "chpasswd: Check hash before write when using -e")
Link: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1124835>
Reported-by: Marc 'Zugschlus' Haber <mh+githubvisible@zugschlus.de>
Reported-by: "Serge E. Hallyn" <serge@hallyn.com>
Reported-by: Adam Williamson <awilliam@redhat.com>
Co-authored-by: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/chkhash.c