Subject: Password prompts and SIGTSTP
To: None <tech-userlevel@netbsd.org>
From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
List: tech-userlevel
Date: 04/21/2001 17:53:13
Hi!

While looking for a good example how to do it correctly, I was
unsuccessful in finding a single program that uses a password prompt
(the main criterion being that the input is not echoed back) and
reacts well to a <CTRL-Z fg> combination.

E.g. lock:
wiz@hiro:~> lock
Key: 
[1]+  Stopped                 lock
wiz@hiro:~> fg
lock
password

Again: 
...

where password is the password that should have been hidden.
ssh does something similar (freessh too), skeyinit does too. passwd
and login ignore the signal and handles it only after getting the
complete password (which is an improvement, I guess).

Is a SIGCONT handler the right answer, or is the behaviour of passwd
and login fine?

Bye,
 Thomas

-- 
Thomas Klausner - wiz@danbala.tuwien.ac.at
The secret of life is honesty and fair dealing. If you can fake that,
you've got it made. -- Groucho Marx