]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/chkhash.c: is_valid_hash(): Comment meaning of !hash and *
authorAlejandro Colomar <alx@kernel.org>
Thu, 15 Jan 2026 00:24:10 +0000 (01:24 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 23 Jan 2026 15:42:06 +0000 (16:42 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/chkhash.c

index 1723f862cdcc0ea405e32e62ec9bb4902b98197c..101f2004e86224d0b216073ab085cf82779038d4 100644 (file)
@@ -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;