summaryrefslogtreecommitdiff
path: root/src/shared/conf-parser.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-09 09:45:12 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-09 10:16:42 +0100
commit2d17d699bb10803a46624569322900e9f7086406 (patch)
treee7a0923be3960de7275d5510437067763c153a79 /src/shared/conf-parser.h
parent97f27f8a1690cdf32f34edd43121eeda6452676a (diff)
downloadsystemd-2d17d699bb10803a46624569322900e9f7086406.tar.gz
conf-parse: add generic config_parse_safe_string() helper
This helper is just like config_parse_string() but does some superficial checks for control characters and quotes. In most cases we currently use config_parse_string() we probably want to use config_parse_safe_string() for safety reasons.
Diffstat (limited to 'src/shared/conf-parser.h')
-rw-r--r--src/shared/conf-parser.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 1e03f93bce..e93ea89b29 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -168,6 +168,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_bool);
CONFIG_PARSER_PROTOTYPE(config_parse_id128);
CONFIG_PARSER_PROTOTYPE(config_parse_tristate);
CONFIG_PARSER_PROTOTYPE(config_parse_string);
+CONFIG_PARSER_PROTOTYPE(config_parse_safe_string);
CONFIG_PARSER_PROTOTYPE(config_parse_path);
CONFIG_PARSER_PROTOTYPE(config_parse_strv);
CONFIG_PARSER_PROTOTYPE(config_parse_sec);