mirror of
https://github.com/shadow-maint/shadow.git
synced 2026-01-26 14:03:17 +00:00
passwd: check_password: Use shadow entry for logs
Always use the name in shadow entry for logging. This reduces the amount of data retrieved from password entry to bare minimum, i.e. passing through into library call. Reviewed-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
This commit is contained in:
parent
5719f1ec53
commit
d37f63a2b3
@ -436,8 +436,8 @@ static void check_password (const struct passwd *pw, const struct spwd *sp)
|
||||
if (now < ok) {
|
||||
(void) fprintf (stderr,
|
||||
_("The password for %s cannot be changed yet.\n"),
|
||||
pw->pw_name);
|
||||
SYSLOG ((LOG_WARN, "now < minimum age for '%s'", pw->pw_name));
|
||||
sp->sp_namp);
|
||||
SYSLOG ((LOG_WARN, "now < minimum age for '%s'", sp->sp_namp));
|
||||
closelog ();
|
||||
exit (E_NOPERM);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user