summaryrefslogtreecommitdiff
path: root/src/shared/ask-password-api.h
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2014-10-03 15:53:45 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-05 15:29:41 -0400
commit64845bdc829d6a6179d0762b7e97ef23828562a3 (patch)
tree639cc68e573d665a61a45836d1793ac2eb96932c /src/shared/ask-password-api.h
parent75a0da952f603006d6b3535ecaf8ebe2bded30e7 (diff)
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.]
Diffstat (limited to 'src/shared/ask-password-api.h')
-rw-r--r--src/shared/ask-password-api.h4
1 files changed, 2 insertions, 2 deletions
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);