diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-17 11:13:20 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-17 11:35:04 +0200 |
commit | 8a07b4033e5d3c86931b3dd2ddbca41118c05c60 (patch) | |
tree | b7a3941d5ba8c28ff256464b7e01f3de935b5691 /src/basic | |
parent | nspawn: fix misplaced parenthesis and merge two error handling paths (diff) | |
download | systemd-8a07b4033e5d3c86931b3dd2ddbca41118c05c60.tar.xz systemd-8a07b4033e5d3c86931b3dd2ddbca41118c05c60.zip |
shared/conf-parser,networkd: EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE → EXTRACT_UNQUOTE
It's hard to even say what exactly this combination means. Escaping is
necessary when quoting to have quotes within the string. So the escaping of
quote characters is inherently tied to quoting. When unquoting, it seems
natural to remove escaping which was done for the quoting purposes. But with
both flags we would be expected to re-add this escaping after unqouting? Or
maybe keep the escaping which is not necessary for quoting but otherwise
present? This all seems too complicated, let's just forbid such usage and
always fully unescape when unquoting.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/extract-word.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c index 34cfb36a4a..b7ae2ed1cd 100644 --- a/src/basic/extract-word.c +++ b/src/basic/extract-word.c @@ -28,6 +28,8 @@ int extract_first_word(const char **p, char **ret, const char *separators, Extra assert(p); assert(ret); + /* Those two don't make sense together. */ + assert(!FLAGS_SET(flags, EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE)); /* Bail early if called after last value or with no input */ if (!*p) |