]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/nspawn/nspawn.c
nspawn: use three boolean fields from settings file when actually set
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 17:23:36 +0000 (18:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 17:32:15 +0000 (18:32 +0100)
commitd3689b94353d5f29b9d99d80bf6d888bd4eb70cc
tree179541a14e8158783d325bdb66193e8cc2ecc753
parenta1dfd585c4a3a737b0c4b61e82148bbdfd201733
nspawn: use three boolean fields from settings file when actually set

Let's turn these three fields into tristates, so that we can distinguish
whether they are not configured at all from explicitly turned off.

Let#s then use this to ensure that we only copy the settings fields into
our execution environment if they are actually configured.

We already do this for some of the boolean settings, this adds it for
the missing ones.

The goal here is to ensure that an empty settings file used in
--settings=override mode (i.e. the default mode used in the
systemd-nspawn@.service unit) is truly a NOP.
src/nspawn/nspawn-gperf.gperf
src/nspawn/nspawn-settings.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn.c