]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/passwd.c: check password length upper limit
authorTomas Halman <tomas@halman.net>
Fri, 16 Feb 2024 08:52:39 +0000 (09:52 +0100)
committerAlejandro Colomar <alx@kernel.org>
Fri, 16 Feb 2024 22:38:12 +0000 (23:38 +0100)
commit9d5591fba90f69bcbd273fb76cccb722953334fb
tree62c180985c8d248f057449a38abe95f56ba2f652
parentbed23cc34d505ce1c0be7c1629dfba98b26f831a
src/passwd.c: check password length upper limit

The passwd silently truncated the password length to PASS_MAX.
This patch introduces check that prints an error message
and exits the call.

Signed-off-by: Tomas Halman <tomas@halman.net>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: f024002b3d66 ("src/passwd.c: inconsistent password length limit")
Cc: Serge Hallyn <serge@hallyn.com>
Link: <https://github.com/shadow-maint/shadow/pull/953>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/passwd.c