Added -S flag (read passwd from stdin) and tgetpass_flags global

that holds flags to be passed in to tgetpass().  Change echo_off
param to tgetpass() into a flags field.  There are currently 2
possible flags for tgetpass(): TGP_ECHO and TGP_STDIN.  In tgetpass(),
abstract the echo set/clear via macros and if (flags & TGP_ECHO)
but echo is not set on the terminal, but sure to set it.
This commit is contained in:
Todd C. Miller
2000-02-27 03:49:07 +00:00
parent de44c711bb
commit 54fbe08545
10 changed files with 92 additions and 91 deletions

View File

@@ -155,7 +155,8 @@ verify_user(prompt)
#ifdef AUTH_STANDALONE
p = prompt;
#else
p = (char *) tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60, 1);
p = (char *) tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60,
tgetpass_flags);
if (!p || *p == '\0')
nil_pw = 1;
#endif /* AUTH_STANDALONE */