Fix visiblepw sudoers option; the plugin API portion still needs documenting

This commit is contained in:
Todd C. Miller
2010-06-10 15:02:32 -04:00
parent 879d01796c
commit e146aaaa29
5 changed files with 17 additions and 7 deletions

View File

@@ -92,7 +92,8 @@ tgetpass(const char *prompt, int timeout, int flags)
}
/* If no tty present and we need to disable echo, try askpass. */
if (!ISSET(flags, TGP_STDIN|TGP_ECHO|TGP_ASKPASS) && !tty_present()) {
if (!ISSET(flags, TGP_STDIN|TGP_ECHO|TGP_ASKPASS|TGP_NOECHO_TRY) &&
!tty_present()) {
if (askpass == NULL || getenv("DISPLAY") == NULL) {
warningx("no tty present and no askpass program specified");
return(NULL);