summaryrefslogtreecommitdiffstats
path: root/src/shared/conf-parser.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-07 08:09:23 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-10 06:43:48 +0100
commite289ce7f67bb5a560bf9dcdc9017c0e1a135fec0 (patch)
tree84730e7b2132dfd86cdaaf8e996f8c69ffe81dea /src/shared/conf-parser.h
parentconf-parser: merge config_parse_string() and config_parse_safe_string() (diff)
downloadsystemd-e289ce7f67bb5a560bf9dcdc9017c0e1a135fec0.tar.xz
systemd-e289ce7f67bb5a560bf9dcdc9017c0e1a135fec0.zip
conf-parser: introduce CONFIG_PARSE_STRING_ASCII flag
When the flag is set, the string which contains non-ascii characters will be refused.
Diffstat (limited to 'src/shared/conf-parser.h')
-rw-r--r--src/shared/conf-parser.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index b0d6cebc97..f3044b0ca6 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -204,6 +204,9 @@ typedef enum Disabled {
typedef enum ConfigParseStringFlags {
CONFIG_PARSE_STRING_SAFE = 1 << 0,
+ CONFIG_PARSE_STRING_ASCII = 1 << 1,
+
+ CONFIG_PARSE_STRING_SAFE_AND_ASCII = CONFIG_PARSE_STRING_SAFE | CONFIG_PARSE_STRING_ASCII,
} ConfigParseStringFlags;
#define DEFINE_CONFIG_PARSE(function, parser, msg) \