From: Todd C. Miller Date: Tue, 27 Mar 2012 16:25:04 +0000 (-0400) Subject: Fetch the value of "askpass" from the sudo conf struct. X-Git-Tag: SUDO_1_8_5~1^2~117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d35a8b4de40e6216e9227d23b2d935f463084a77;p=sudo Fetch the value of "askpass" from the sudo conf struct. --- diff --git a/src/sudo.h b/src/sudo.h index ec981132f..91adbe5c5 100644 --- a/src/sudo.h +++ b/src/sudo.h @@ -163,8 +163,6 @@ void cleanup(int); /* tgetpass.c */ char *tgetpass(const char *, int, int); int tty_present(void); -extern const char *askpass_path; -extern const char *noexec_path; /* zero_bytes.c */ void zero_bytes(volatile void *, size_t); diff --git a/src/tgetpass.c b/src/tgetpass.c index f8a9d3e32..c19e83b9c 100644 --- a/src/tgetpass.c +++ b/src/tgetpass.c @@ -61,12 +61,6 @@ static void handler(int); static char *getln(int, char *, size_t, int); static char *sudo_askpass(const char *, const char *); -#ifdef _PATH_SUDO_ASKPASS -const char *askpass_path = _PATH_SUDO_ASKPASS; -#else -const char *askpass_path; -#endif - /* * Like getpass(3) but with timeout and echo flags. */ @@ -86,7 +80,7 @@ tgetpass(const char *prompt, int timeout, int flags) if (askpass == NULL) { askpass = getenv("SUDO_ASKPASS"); if (askpass == NULL || *askpass == '\0') - askpass = askpass_path; + askpass = sudo_conf_askpass_path(); } /* If no tty present and we need to disable echo, try askpass. */