Use the SUDO_CONV_PREFER_TTY flag during authentication.

This prevents the password and PAM prompts from being redirected.
Bug #895
This commit is contained in:
Todd C. Miller
2019-08-26 19:30:11 -06:00
parent 5a22865131
commit 972670bfca
9 changed files with 51 additions and 29 deletions

View File

@@ -227,7 +227,7 @@ pass_warn(void)
if (def_insults)
warning = INSULT;
#endif
sudo_printf(SUDO_CONV_ERROR_MSG, "%s\n", warning);
sudo_printf(SUDO_CONV_ERROR_MSG|SUDO_CONV_PREFER_TTY, "%s\n", warning);
debug_return;
}