Bug 243584

Summary: OpenPAM openpam_ttyconv() fails to handle suspend/resume properly.
Product: Base System Reporter: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not Enough Information    
Severity: Affects Only Me    
Priority: ---    
Version: 11.3-STABLE   
Hardware: Any   
OS: Any   

Description Jonathan de Boyne Pollard 2020-01-25 11:34:53 UTC
Per https://unix.stackexchange.com/a/563986/5132 :

1. Run "su ; cat"
2. Press Control+Z (or whatever your susp character is) at the "Password:" prompt.
3. Notice that there is no terminal echo as `cat` is reading.

Also:

1. Run "su ; stty echo ; fg"
2. Press Control+Z (or whatever your susp character is) at the "Password:" prompt.
3. Notice that your password is now echoed as it is entered into `su`.

Use sh or compatible to replicate this, not the C shell, which does not execute the commands after su.

Contrast getpass(3), which at least handles SIGTSTP (even though it does not do so by also handling SIGCONT).
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2020-01-26 01:10:49 UTC
Can you be more specific about what you think is a bug?  I.e., what is the expected behavior and how does it differ from what you've demonstrated?  Why do you expect that?