=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/check.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- src/usr.bin/sudo/Attic/check.c 2008/11/14 11:58:08 1.16 +++ src/usr.bin/sudo/Attic/check.c 2008/11/25 17:02:27 1.17 @@ -59,7 +59,7 @@ #include "sudo.h" #ifndef lint -__unused static const char rcsid[] = "$Sudo: check.c,v 1.244 2008/11/11 18:28:08 millert Exp $"; +__unused static const char rcsid[] = "$Sudo: check.c,v 1.245 2008/11/25 17:01:34 millert Exp $"; #endif /* lint */ /* Status codes for timestamp_status() */ @@ -109,9 +109,9 @@ if (user_askpass == NULL) log_error(NO_MAIL, "no askpass program specified, try setting SUDO_ASKPASS"); - } else { + } else if (!ISSET(tgetpass_flags, TGP_STDIN)) { /* If no tty but DISPLAY is set, use askpass if we have it. */ - if (!user_ttypath && !ISSET(tgetpass_flags, TGP_STDIN)) { + if (!user_ttypath && !tty_present()) { if (user_askpass && user_display && *user_display != '\0') { SET(tgetpass_flags, TGP_ASKPASS); } else if (!def_visiblepw) {