Some defaults I_ defines got renamed.
This commit is contained in:
@@ -67,7 +67,7 @@ aixauth_verify(pw, prompt, auth)
|
||||
char *message, *pass;
|
||||
int reenter = 1;
|
||||
|
||||
pass = tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags);
|
||||
pass = tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags);
|
||||
if (authenticate(pw->pw_name, pass, &reenter, &message) == 0)
|
||||
return(AUTH_SUCCESS);
|
||||
else
|
||||
|
@@ -122,9 +122,9 @@ bsdauth_verify(pw, prompt, auth)
|
||||
* S/Key.
|
||||
*/
|
||||
if ((s = auth_challenge(as)) == NULL) {
|
||||
pass = tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags);
|
||||
pass = tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags);
|
||||
} else {
|
||||
pass = tgetpass(s, def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags);
|
||||
pass = tgetpass(s, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags);
|
||||
if (!pass || *pass == '\0') {
|
||||
if ((prompt = strrchr(s, '\n')))
|
||||
prompt++;
|
||||
@@ -139,7 +139,7 @@ bsdauth_verify(pw, prompt, auth)
|
||||
while (isspace(prompt[len]) || prompt[len] == ':')
|
||||
prompt[len--] = '\0';
|
||||
easprintf(&s, "%s [echo on]: ", prompt);
|
||||
pass = tgetpass(s, def_ival(I_PW_TIMEOUT) * 60,
|
||||
pass = tgetpass(s, def_ival(I_PASSWD_TIMEOUT) * 60,
|
||||
tgetpass_flags | TGP_ECHO);
|
||||
free(s);
|
||||
}
|
||||
|
@@ -118,13 +118,14 @@ fwtk_verify(pw, prompt, auth)
|
||||
/* Get the password/response from the user. */
|
||||
if (strncmp(resp, "challenge ", 10) == 0) {
|
||||
(void) snprintf(buf, sizeof(buf), "%s\nResponse: ", &resp[10]);
|
||||
pass = tgetpass(buf, def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags);
|
||||
pass = tgetpass(buf, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags);
|
||||
if (!pass || *pass == '\0') {
|
||||
pass = tgetpass("Response [echo on]: ", def_ival(I_PW_TIMEOUT) * 60,
|
||||
tgetpass_flags | TGP_ECHO);
|
||||
pass = tgetpass("Response [echo on]: ",
|
||||
def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags | TGP_ECHO);
|
||||
}
|
||||
} else if (strncmp(resp, "password", 8) == 0) {
|
||||
pass = tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags);
|
||||
pass = tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60,
|
||||
tgetpass_flags);
|
||||
} else {
|
||||
(void) fprintf(stderr, "%s: %s\n", Argv[0], resp);
|
||||
return(AUTH_FATAL);
|
||||
|
@@ -155,7 +155,7 @@ sudo_conv(num_msg, msg, response, appdata_ptr)
|
||||
p = pm->msg;
|
||||
/* Read the password. */
|
||||
pr->resp = estrdup((char *) tgetpass(p,
|
||||
def_ival(I_PW_TIMEOUT) * 60, tgetpass_flags));
|
||||
def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags));
|
||||
if (*pr->resp == '\0')
|
||||
nil_pw = 1; /* empty password */
|
||||
break;
|
||||
|
@@ -80,8 +80,8 @@ sudo_collect(timeout, rendition, title, nprompts, prompts)
|
||||
switch (rendition) {
|
||||
case SIAFORM:
|
||||
case SIAONELINER:
|
||||
if (timeout <= 0 || timeout > def_ival(I_PW_TIMEOUT) * 60)
|
||||
timeout = def_ival(I_PW_TIMEOUT) * 60;
|
||||
if (timeout <= 0 || timeout > def_ival(I_PASSWD_TIMEOUT) * 60)
|
||||
timeout = def_ival(I_PASSWD_TIMEOUT) * 60;
|
||||
/*
|
||||
* Substitute custom prompt if a) the sudo prompt is not "Password:"
|
||||
* and b) the SIA prompt is "Password:" (so we know it is safe).
|
||||
|
@@ -99,7 +99,7 @@ verify_user(pw, prompt)
|
||||
struct passwd *pw;
|
||||
char *prompt;
|
||||
{
|
||||
short counter = def_ival(I_PW_TRIES) + 1;
|
||||
short counter = def_ival(I_PASSWD_TRIES) + 1;
|
||||
short success = AUTH_FAILURE;
|
||||
short status;
|
||||
char *p;
|
||||
@@ -156,7 +156,7 @@ verify_user(pw, prompt)
|
||||
#ifdef AUTH_STANDALONE
|
||||
p = prompt;
|
||||
#else
|
||||
p = (char *) tgetpass(prompt, def_ival(I_PW_TIMEOUT) * 60,
|
||||
p = (char *) tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60,
|
||||
tgetpass_flags);
|
||||
if (!p || *p == '\0')
|
||||
nil_pw = 1;
|
||||
@@ -184,7 +184,7 @@ verify_user(pw, prompt)
|
||||
|
||||
/* Exit loop on nil password, but give it a chance to match first. */
|
||||
if (nil_pw) {
|
||||
if (counter == def_ival(I_PW_TRIES))
|
||||
if (counter == def_ival(I_PASSWD_TRIES))
|
||||
exit(1);
|
||||
else
|
||||
break;
|
||||
@@ -214,8 +214,8 @@ cleanup:
|
||||
return;
|
||||
case AUTH_FAILURE:
|
||||
log_error(NO_MAIL, "%d incorrect password attempt%s",
|
||||
def_ival(I_PW_TRIES) - counter,
|
||||
(def_ival(I_PW_TRIES) - counter == 1) ? "" : "s");
|
||||
def_ival(I_PASSWD_TRIES) - counter,
|
||||
(def_ival(I_PASSWD_TRIES) - counter == 1) ? "" : "s");
|
||||
case AUTH_FATAL:
|
||||
exit(1);
|
||||
}
|
||||
@@ -231,7 +231,7 @@ pass_warn(fp)
|
||||
(void) fprintf(fp, "%s\n", INSULT);
|
||||
else
|
||||
#endif
|
||||
(void) fprintf(fp, "%s\n", def_str(I_BADPASS_MSG));
|
||||
(void) fprintf(fp, "%s\n", def_str(I_BADPASS_MESSAGE));
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user