summaryrefslogtreecommitdiffstats
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-07 07:39:07 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-10 06:43:43 +0100
commit3f87eaa5d812099a5d7bcec4e0a123706612a0ed (patch)
tree2a4aceec007987a6de03bb5190f4e9e2317d25c7 /src/tty-ask-password-agent
parentpo: Translated using Weblate (Georgian) (diff)
downloadsystemd-3f87eaa5d812099a5d7bcec4e0a123706612a0ed.tar.xz
systemd-3f87eaa5d812099a5d7bcec4e0a123706612a0ed.zip
conf-parser: merge config_parse_string() and config_parse_safe_string()
This also makes unsafe strings escaped when logged. Otherwise, journalctl may not show the log message unless '--all' is specified.
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 72559e11a9..e98b38510e 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -177,13 +177,13 @@ static int process_one_password_file(const char *filename) {
pid_t pid = 0;
const ConfigTableItem items[] = {
- { "Ask", "Socket", config_parse_safe_string, 0, &socket_name },
- { "Ask", "NotAfter", config_parse_uint64, 0, &not_after },
- { "Ask", "Message", config_parse_string, 0, &message },
- { "Ask", "PID", config_parse_pid, 0, &pid },
- { "Ask", "AcceptCached", config_parse_bool, 0, &accept_cached },
- { "Ask", "Echo", config_parse_bool, 0, &echo },
- { "Ask", "Silent", config_parse_bool, 0, &silent },
+ { "Ask", "Socket", config_parse_string, CONFIG_PARSE_STRING_SAFE, &socket_name },
+ { "Ask", "NotAfter", config_parse_uint64, 0, &not_after },
+ { "Ask", "Message", config_parse_string, 0, &message },
+ { "Ask", "PID", config_parse_pid, 0, &pid },
+ { "Ask", "AcceptCached", config_parse_bool, 0, &accept_cached },
+ { "Ask", "Echo", config_parse_bool, 0, &echo },
+ { "Ask", "Silent", config_parse_bool, 0, &silent },
{}
};