diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-07 07:39:07 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-10 06:43:43 +0100 |
commit | 3f87eaa5d812099a5d7bcec4e0a123706612a0ed (patch) | |
tree | 2a4aceec007987a6de03bb5190f4e9e2317d25c7 /src/tty-ask-password-agent | |
parent | po: Translated using Weblate (Georgian) (diff) | |
download | systemd-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.c | 14 |
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, ¬_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, ¬_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 }, {} }; |