]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/chkhash.c: is_valid_hash(): Update comment
authorAlejandro Colomar <alx@kernel.org>
Thu, 15 Jan 2026 00:14:46 +0000 (01:14 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 23 Jan 2026 15:42:06 +0000 (16:42 +0100)
This checks the entire shadow(5) 2nd field, which is more than just
a hash.

Reported-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/chkhash.c

index d0a8dc0119785f7417660336c8f78d598979db5b..1723f862cdcc0ea405e32e62ec9bb4902b98197c 100644 (file)
@@ -31,9 +31,7 @@ match_regex(const char *pattern, const char *string)
 
 
 /*
- * is_valid_hash - check if the given string is a valid password hash
- *
- * Returns true if the string appears to be a valid hash, false otherwise.
+ * is_valid_hash - check if the string is a valid shadow(5) 2nd field.
  *
  * regex from: https://man.archlinux.org/man/crypt.5.en
  */