]> granicus.if.org Git - linux-pam/commit
pam_lastlog: Respect PAM_SILENT flag
authorNir Soffer <nsoffer@redhat.com>
Sat, 5 Jan 2019 22:36:27 +0000 (00:36 +0200)
committerTomáš Mráz <t8m@users.noreply.github.com>
Thu, 10 Jan 2019 08:21:19 +0000 (09:21 +0100)
commit7d036249a9772c546ede1f38ad68b3f1575216d6
tree9987686157f5b40a78c9fcd51ddc7cef37dab715
parentbe49469b9119767158bc5306f4085c366751c56b
pam_lastlog: Respect PAM_SILENT flag

pam_lastlog module will not log info about failed login if the session
was opened with PAM_SILENT flag.

Example use case enabled by this change:

    sudo --non-interactive program

If this command is run by another program expecting specific output from
the command run by sudo, the unexpected info about failed logins will
break this program.

* modules/pam_lastlog/pam_lastlog.c: Respect silent option.
  (_pam_session_parse): Unset LASTLOG_BTMP if PAM_SILENT is set.
modules/pam_lastlog/pam_lastlog.c