]> git.ipfire.org Git - thirdparty/systemd.git/commit
Fail on unknown (alphanumerical) specifiers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 24 Nov 2017 11:19:40 +0000 (12:19 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 6 Dec 2017 09:17:37 +0000 (10:17 +0100)
commit751223fecf56c6865080c2dda760a47a9958e49c
tree31a43edff3c61d5debc7931202a33450961c7d92
parent2df36d096d7b2691ac11f415b3bb8da2a26ac8b7
Fail on unknown (alphanumerical) specifiers

The code intentionally ignored unknown specifiers, treating them as text. This
needs to change because otherwise we can never add a new specifier in a backwards
compatible way. So just treat an unknown (potential) specifier as an error.

In principle this is a break of backwards compatibility, but the previous
behaviour was pretty much useless, since the expanded value could change every
time we add new specifiers, which we do all the time.

As a compromise for backwards compatibility, only fail on alphanumerical
characters. This should cover the most cases where an unescaped percent
character is used, like size=5% and such, which behave the same as before with
this patch. OTOH, this means that we will not be able to use non-alphanumerical
specifiers without breaking backwards compatibility again. I think that's an
acceptable compromise.

v2:
- add NEWS entry

v3:
- only fail on alphanumerical
NEWS
man/systemd.unit.xml
man/tmpfiles.d.xml
src/shared/specifier.c
src/test/test-systemd-tmpfiles.py
src/tmpfiles/tmpfiles.c