Skip to content

Commit 9a86c51

Browse files
alejandro-colomarikerexxe
authored andcommitted
lib/chkhash.c: is_valid_hash(): Comment meaning of !hash and *
Signed-off-by: Alejandro Colomar <alx@kernel.org>
1 parent bce404a commit 9a86c51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/chkhash.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ match_regex(const char *pattern, const char *string)
3838
bool
3939
is_valid_hash(const char *hash)
4040
{
41+
// Password temporarily locked
4142
hash = strprefix(hash, "!") ?: hash;
4243

4344
// Passwordless account; discouraged
4445
if (streq(hash, ""))
4546
return true;
4647

48+
// Password permanently locked (and forgotten)
4749
if (streq(hash, "*"))
4850
return true;
4951

0 commit comments

Comments
 (0)