]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: don't muck with caps if no network setting is used in settings file 21283/head
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 17:27:40 +0000 (18:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 17:32:30 +0000 (18:32 +0100)
commit9baa294c12e6d3e191081260092b877bf6bd3275
tree3c1f11c43100392904346d4945a0e1dba19bd89c
parent2d09ea44fcd7c13658bf2e706b4ecd6aba35bfbf
nspawn: don't muck with caps if no network setting is used in settings file

Our goal here (as in the previous commits) is to ensure that a settings
file loaded in --settings=override mode is truly a NOP. Previously this
was not the case as we'd drop CAP_NET_ADMIN from the caps if the
settings file didn't enable networking.

With this change we'll drop it only if explicitly turned off in the
settings file, and otherwise let the built-in defaults and cmdline
params reign supreme as documented.

Fixes: #20055
src/nspawn/nspawn.c