commit: afb7be5a963fbdf0316d168031383b7f8239a92f Author: Thibaud CANALE <thican <AT> thican <DOT> net> AuthorDate: Mon Feb 24 10:27:02 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Mar 13 08:53:32 2025 +0000 URL: https://gitweb.gentoo.org/proj/pambase.git/commit/?id=afb7be5a
system-login: put lastlog failed login after MotD Provide the lastlog information after MotD, the latter can be too big and then eclipse the former, which usually is limited to one or two lines. Closes: https://bugs.gentoo.org/950228 Signed-off-by: Thibaud CANALE <thican <AT> thican.net> Signed-off-by: Sam James <sam <AT> gentoo.org> templates/system-login.tpl | 7 +------ tests/rendered/custom/system-login | 2 +- tests/rendered/default/system-login | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/templates/system-login.tpl b/templates/system-login.tpl index 5549673..bdde91e 100644 --- a/templates/system-login.tpl +++ b/templates/system-login.tpl @@ -16,9 +16,6 @@ session required pam_selinux.so close {% endif %} session required pam_env.so envfile=/etc/profile.env {{ debug|default('', true) }} -{% if not minimal %} -session optional pam_lastlog.so silent {{ debug|default('', true) }} -{% endif %} session include system-auth {% if selinux %} # Note: modules that run in the user's context must come after this line. @@ -27,9 +24,7 @@ session required pam_selinux.so multiple open {% if not minimal %} session optional pam_motd.so motd=/etc/motd -{% endif %} - -{% if not minimal %} +session optional pam_lastlog.so silent {{ debug|default('', true) }} session optional pam_mail.so {% endif %} diff --git a/tests/rendered/custom/system-login b/tests/rendered/custom/system-login index 161a600..4df9984 100644 --- a/tests/rendered/custom/system-login +++ b/tests/rendered/custom/system-login @@ -8,8 +8,8 @@ account include system-auth password include system-auth session optional pam_loginuid.so session required pam_env.so envfile=/etc/profile.env -session optional pam_lastlog.so silent session include system-auth session optional pam_motd.so motd=/etc/motd +session optional pam_lastlog.so silent session optional pam_mail.so -session optional pam_elogind.so diff --git a/tests/rendered/default/system-login b/tests/rendered/default/system-login index 56cf515..ee59a1d 100644 --- a/tests/rendered/default/system-login +++ b/tests/rendered/default/system-login @@ -7,7 +7,7 @@ account include system-auth password include system-auth session optional pam_loginuid.so session required pam_env.so envfile=/etc/profile.env -session optional pam_lastlog.so silent session include system-auth session optional pam_motd.so motd=/etc/motd +session optional pam_lastlog.so silent session optional pam_mail.so
