2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

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

@@ -67,7 +67,7 @@ aixauth_verify(pw, prompt, auth)
char *message, *pass;
int reenter = 1;
pass = tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60, 1);
pass = tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags);
if (authenticate(pw->pw_name, pass, &reenter, &message) == 0)
return(AUTH_SUCCESS);
else