From: Todd C. Miller Date: Sun, 31 Dec 2000 01:39:06 +0000 (+0000) Subject: Some defaults I_ defines got renamed. X-Git-Tag: SUDO_1_6_4~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16e6a3b84ae8c9dda9bfc0d7700f4a118ea737e3;p=sudo Some defaults I_ defines got renamed. --- diff --git a/auth/aix_auth.c b/auth/aix_auth.c index 3e8981ebf..39afbf58d 100644 --- a/auth/aix_auth.c +++ b/auth/aix_auth.c @@ -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 diff --git a/auth/bsdauth.c b/auth/bsdauth.c index b6e24067d..cfd3f9da6 100644 --- a/auth/bsdauth.c +++ b/auth/bsdauth.c @@ -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); } diff --git a/auth/fwtk.c b/auth/fwtk.c index 3c7623749..8d395dd8b 100644 --- a/auth/fwtk.c +++ b/auth/fwtk.c @@ -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); diff --git a/auth/pam.c b/auth/pam.c index 01f455b41..98cfa3d62 100644 --- a/auth/pam.c +++ b/auth/pam.c @@ -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; diff --git a/auth/sia.c b/auth/sia.c index 8c80c1a3b..5d9eba38c 100644 --- a/auth/sia.c +++ b/auth/sia.c @@ -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). diff --git a/auth/sudo_auth.c b/auth/sudo_auth.c index 07a4ed7d8..ce8614b9a 100644 --- a/auth/sudo_auth.c +++ b/auth/sudo_auth.c @@ -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