]> git.ipfire.org Git - thirdparty/shadow.git/commit
PASS_MAX_LEN.xml: Explain PASS_MAX_LEN use cases
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 19 Dec 2025 11:02:45 +0000 (11:02 +0000)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Fri, 19 Dec 2025 16:01:11 +0000 (17:01 +0100)
commit7255cd93a642ccfcd8cf89f0cbe1085d5c43ca27
treea16b5c99395d6d6cff2efca3d96c25f532732ca7
parent734fe78a74b8f452fd2e17349091c299afc877f0
PASS_MAX_LEN.xml: Explain PASS_MAX_LEN use cases

The `PASS_MAX_LEN` is effectively only used for DES. Do not describe it
in a way that makes it sound like `MD_CRYPT_ENAB=yes` is required to
disable it. Any other `ENCRYPT_METHOD` disables it as well.

Also, even for DES, `PASS_MAX_LEN` requires `OBSCURE_CHECKS_ENAB` to
have any effect.

Even more, `PASS_MIN_LEN` and `PASS_MAX_LEN` are only used for
user passwords. Group passwords are not checked.

Note: All of this is actually true even if compiled with PAM if command
line arguments change root. But if compiled with PAM support, this
section is not added to manual pages... Since this is true for some
more files, it's not part of this commit.

Link to source files:
- lib/obscure.c line 133 stops further checks, including max length,
  if OBSCURE_CHECS_ENAB is not yes
- lib/obscure.c line 172 is only reached in case of DES
- src/passwd.c line 248 duplicates the check for output
- src/gpasswd.c has no reference to obscure

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
man/login.defs.d/PASS_MAX_LEN.xml