X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftgetpass.c;h=b23db4cc5fe87c9b3b9a1e684e9cb1fb47c668f4;hb=ef258354719127382087c58e5c0f83ee45c958f6;hp=e9915b2bdd7af6a7e96341214d9e31387c4747d3;hpb=2e444a5714593fb7659157cee2e7037577c0bdcd;p=debian%2Fsudo diff --git a/src/tgetpass.c b/src/tgetpass.c index e9915b2..b23db4c 100644 --- a/src/tgetpass.c +++ b/src/tgetpass.c @@ -78,7 +78,7 @@ tgetpass(const char *prompt, int timeout, int flags) (void) fflush(stdout); if (askpass == NULL) { - askpass = getenv("SUDO_ASKPASS"); + askpass = getenv_unhooked("SUDO_ASKPASS"); if (askpass == NULL || *askpass == '\0') askpass = sudo_conf_askpass_path(); } @@ -86,7 +86,7 @@ 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|TGP_NOECHO_TRY) && !tty_present()) { - if (askpass == NULL || getenv("DISPLAY") == NULL) { + if (askpass == NULL || getenv_unhooked("DISPLAY") == NULL) { warningx(_("no tty present and no askpass program specified")); debug_return_str(NULL); }