Bugzilla – Bug 84
tgetpass should turn off echo before emitting password prompt
Last modified: 2002-12-13 15:19:57 MST
sudo emits the password prompt before it turns off screen echo. On heavily loaded boxes, this can cause the user's password to show up on the screen when he/she types it. This would fairly easily be solved by moving the term_setattr call to before the write(output, prompt, strlen(prompt)) call. The prompt would still be written to the screen, AFAIK, but not until after the tty was ready to not echo any characters typed by the user. I have personally witnessed this happening a number of times on some of our very heavily-loaded machines, and it ends up echoing my password to the screen, which bothers me a bit, and is a security weakness.
That sounds entirely sensible; this change will be in the next release of sudo.