]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: gracefully skip unknown policy designators in RootImagePolicy et al (#40060)
authorLuca Boccassi <bluca@debian.org>
Thu, 11 Dec 2025 05:38:26 +0000 (05:38 +0000)
committerGitHub <noreply@github.com>
Thu, 11 Dec 2025 05:38:26 +0000 (14:38 +0900)
commit7c0afcdde22d3d94fd23bfd0e473c263aaf54e8a
tree7f78bebac8eb1b2feb6ce69d718108ad2a0a22d9
parent72711b76e0b61772f1332e37ee74cb8349351766
core: gracefully skip unknown policy designators in RootImagePolicy et al (#40060)

Usually we gracefully ignore unknown configuration parameters, so that
service files can be written by upstreams and used across a variegated
range of distributions with various versions of systemd, to avoid
forcing users to the minimum common denominator and only adding settings
that are supported by the oldest distro supported.

Image policies do not behave like this, and any unknown partition or
policy designator causes the whole unit to fail to parse and a hard
error.

Change it so that parsing RootImagePolicy and friends via unit file or
D-Bus logs but otherwise ignores unknown specifiers, like other options
do.

This allows us to add new specifiers in the future, and users to adopt
them immediately.

Follow-up for d452335aa47fb1f1b11dc75bc462697431e64af3
src/analyze/analyze-image-policy.c
src/core/dbus-execute.c
src/core/execute-serialize.c
src/mountfsd/mountwork.c
src/shared/image-policy.c
src/shared/image-policy.h
src/test/test-image-policy.c
src/udev/udev-builtin-dissect_image.c
test/units/TEST-50-DISSECT.dissect.sh