| Summary: | PAM_TEXT_INFO messages are shown twice if they are the last conversation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Martin <bugs> | ||||
| Component: | PAM support | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | NEW --- | ||||||
| Severity: | normal | ||||||
| Priority: | P5 | ||||||
| Version: | 8.4p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
Martin
2022-10-11 00:44:49 AEDT
Created attachment 3677 [details]
Minimal test case
Attached is a minimal test case that shows the observed behaviour in all it's glory. It includes the tty_output() in the same we include it in our module.
It was compiled on ubuntu 22.10 using:
$ gcc pam_test.c -shared -o pam_test.so -lpam
copied to /usr/local/lib/security
$ sudo cp pam_test.so /usr/local/lib/security/pam_test.so
activated as a pam module in /etc/pam.d/sshd just above common-account
...
auth required /usr/local/lib/security/pam_test.so
# Standard Un*x authorization.
@include common-account
tested using pamtester:
$ pamtester sshd martin authenticate
Password:
Info
pamtester: successfully authenticated
tested using sshd:
$ ssh localhost
(martin@localhost) Password:
Info
Info
Welcome to Ubuntu 22.10 (GNU/Linux 6.1.11 x86_64)
Which clearly shows the double output of the last (and only) PAM_TEXT_INFO message.
|