From: Todd C. Miller Date: Tue, 6 Oct 2015 21:00:47 +0000 (-0600) Subject: Repair challenge/response prompting for BSD authentication which X-Git-Tag: SUDO_1_8_15^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2afb2f2048412e2c39fe74c0c2d8452287f0426d;p=sudo Repair challenge/response prompting for BSD authentication which got broken while it was converted to use the conversation function. --- diff --git a/plugins/sudoers/auth/bsdauth.c b/plugins/sudoers/auth/bsdauth.c index 18a25e32f..438ba2dfb 100644 --- a/plugins/sudoers/auth/bsdauth.c +++ b/plugins/sudoers/auth/bsdauth.c @@ -123,7 +123,7 @@ bsdauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth, struct sudo_con if ((s = auth_challenge(as)) == NULL) { pass = auth_getpass(prompt, def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF, callback); } else { - pass = auth_getpass(prompt, def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF, callback); + pass = auth_getpass(s, def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF, callback); if (pass && *pass == '\0') { if ((prompt = strrchr(s, '\n'))) prompt++; @@ -141,7 +141,7 @@ bsdauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth, struct sudo_con log_warningx(0, N_("unable to allocate memory")); debug_return_int(AUTH_FATAL); } - pass = auth_getpass(prompt, def_passwd_timeout * 60, + pass = auth_getpass(s, def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_ON, callback); free(s); }