Alejandro Colomar 6b1d7aafce
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>
Cherry-picked-from: b323141ee90f (2026-01-16; "lib/chkhash.c: is_valid_hash(): Accept an empty hash")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2026-01-18 22:48:44 +01:00
..
2025-12-05 21:22:45 -06:00
2025-12-19 16:48:08 +01:00
2025-12-19 16:48:08 +01:00
2025-11-27 20:50:48 -06:00
2025-12-05 21:22:45 -06:00
2025-11-27 20:50:48 -06:00
2023-08-31 08:55:26 +02:00
2025-12-05 21:22:45 -06:00
2025-12-16 23:20:32 +01:00
2025-12-16 23:20:32 +01:00
2025-12-19 16:48:08 +01:00
2025-12-05 21:22:45 -06:00
2025-12-16 23:20:32 +01:00
2021-12-23 19:36:50 -06:00
2021-12-23 19:36:50 -06:00
2023-08-31 08:55:26 +02:00
2024-03-10 19:56:40 -05:00
2025-12-19 16:48:08 +01:00
2025-12-19 16:48:08 +01:00
2023-08-31 08:55:26 +02:00
2023-08-31 08:55:26 +02:00
2025-11-27 20:50:48 -06:00
2025-11-04 10:11:16 +01:00
2025-12-05 21:22:45 -06:00
2025-12-05 21:22:45 -06:00
2023-08-31 08:55:26 +02:00
2025-12-19 16:48:08 +01:00
2025-12-19 16:48:08 +01:00
2025-12-05 21:22:45 -06:00
2025-12-16 23:20:32 +01:00
2025-12-05 21:22:45 -06:00
2025-11-27 20:50:48 -06:00
2021-12-23 19:36:50 -06:00
2025-11-27 20:50:48 -06:00
2025-12-05 19:23:18 -06:00
2025-12-05 21:22:45 -06:00
2025-12-24 14:57:37 +01:00
2024-09-18 14:52:05 +02:00
2025-12-05 21:22:45 -06:00
2024-09-18 14:52:05 +02:00
2025-11-27 20:50:48 -06:00
2025-12-30 10:07:45 -06:00
2025-12-05 21:22:45 -06:00
2025-12-19 16:48:08 +01:00
2010-03-18 19:23:00 +00:00
2025-12-05 21:22:45 -06:00