From 64845bdc829d6a6179d0762b7e97ef23828562a3 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 3 Oct 2014 15:53:45 +0200 Subject: ask-password: Add --echo to enable echoing the user input Programs such as OpenVPN may use ask-password for not only retrieving passwords, but also usernames. Masking usernames with * seems just silly. v2 - Don't mess with termios flags, instead print the input instead of an asterix. Resolves issues with backspace and TAB input. v3 - Renamed 'do_echo' variables and argument to 'echo'. Also modified the ask_password_{tty,agent,auto} API instead of additional wrapper functions. [zj: undo changes to ask_password_auto, since no callers were using the new argument.] --- src/shared/ask-password-api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/ask-password-api.h') diff --git a/src/shared/ask-password-api.h b/src/shared/ask-password-api.h index 3839a2df0f..704ee6e1b4 100644 --- a/src/shared/ask-password-api.h +++ b/src/shared/ask-password-api.h @@ -23,10 +23,10 @@ #include "util.h" -int ask_password_tty(const char *message, usec_t until, const char *flag_file, char **_passphrase); +int ask_password_tty(const char *message, usec_t until, bool echo, const char *flag_file, char **_passphrase); int ask_password_agent(const char *message, const char *icon, const char *id, - usec_t until, bool accept_cached, char ***_passphrases); + usec_t until, bool echo, bool accept_cached, char ***_passphrases); int ask_password_auto(const char *message, const char *icon, const char *id, usec_t until, bool accept_cached, char ***_passphrases); -- cgit v1.2.3-54-g00ecf