From: Alejandro Colomar Date: Thu, 15 Jan 2026 00:24:10 +0000 (+0100) Subject: lib/chkhash.c: is_valid_hash(): Comment meaning of !hash and * X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a86c515a1e7caeeb9e60fa63871170a2dfd98f0;p=thirdparty%2Fshadow.git lib/chkhash.c: is_valid_hash(): Comment meaning of !hash and * Signed-off-by: Alejandro Colomar --- diff --git a/lib/chkhash.c b/lib/chkhash.c index 1723f862c..101f2004e 100644 --- a/lib/chkhash.c +++ b/lib/chkhash.c @@ -38,12 +38,14 @@ match_regex(const char *pattern, const char *string) bool is_valid_hash(const char *hash) { + // Password temporarily locked hash = strprefix(hash, "!") ?: hash; // Passwordless account; discouraged if (streq(hash, "")) return true; + // Password permanently locked (and forgotten) if (streq(hash, "*")) return true;