summaryrefslogtreecommitdiff
path: root/src/ask-password/ask-password.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ask-password/ask-password.c')
-rw-r--r--src/ask-password/ask-password.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ask-password/ask-password.c b/src/ask-password/ask-password.c
index fb4b7be4fc..db6f2f59c0 100644
--- a/src/ask-password/ask-password.c
+++ b/src/ask-password/ask-password.c
@@ -200,6 +200,14 @@ static int parse_argv(int argc, char *argv[]) {
arg_message = strv_join(argv + optind, " ");
if (!arg_message)
return log_oom();
+ } else if (FLAGS_SET(arg_flags, ASK_PASSWORD_ECHO)) {
+ /* By default ask_password_auto() will query with the string "Password: ", which is not right
+ * when full echo is on, since then it's unlikely a password. Let's hence default to a less
+ * confusing string in that case. */
+
+ arg_message = strdup("Input:");
+ if (!arg_message)
+ return log_oom();
}
return 1;