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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user