]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/pwd2spwd.c: Set no aging information
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 15 Dec 2025 09:45:41 +0000 (10:45 +0100)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 15 Dec 2025 10:38:34 +0000 (11:38 +0100)
commit7f59cb5ab347e122e685f95e08298f0a8cd3301a
treede5436bdddc7c8f76a5e706b15577a387259debb
parentd82cdfaf4cdc1df04f53f590dfc591073d05dd7e
lib/pwd2spwd.c: Set no aging information

The pwd_to_spwd routine claims that fields without corresponding
information in the password file are set to uninitialized values,
but sets some aging information. These cannot be available in
struct passwd.

Also, the code is only used in passwd to temporarily hold the
new password. All other values are copied from an existing entry
later on. If no entry exists, all values are dismissed anyway.

Clarify that everything is uninitialized except name and password.
Gets rid of magic value 10000 for sp_max.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/pwd2spwd.c