mirror of
https://github.com/shadow-maint/shadow.git
synced 2026-01-26 14:03:17 +00:00
lib/chkhash.c: is_valid_hash(): Comment meaning of !hash and *
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
bce404a7a8
commit
9a86c515a1
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user