nspawn: consistently fail if parsing the environment fails
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Sep 2019 11:58:06 +0000 (13:58 +0200)
committerMichael Biebl <biebl@debian.org>
Sun, 10 Nov 2019 23:58:41 +0000 (23:58 +0000)
commitfdf0f8415b667dad6e1db9b36e191a50d3c7b993
tree1839dcae9b70bb2c0e79b66740346fbf18899051
parent50e07af6ff2e5a06ec09f1b944c008989345a80e
nspawn: consistently fail if parsing the environment fails

We would parse the environment twice (to re-apply settings after reading
config from disk), but we would not check the return code first time.
This means that for some settings we would ignore invalid values, while
for others, we'd fail at some point.

Let's just consistently fail. Those environment variables define important
aspects of behaviour, and it is better for the user if we ignore invalid
values. (Unknown settings are still ignored, so forward compatibility is
maintained.)

(cherry picked from commit 490486842b6521104b594c511ca912504f61a8f3)
(cherry picked from commit 9d8e889810b50b5be6eeecec637e4a8bdda30977)

Gbp-Pq: Name nspawn-consistently-fail-if-parsing-the-environment-fails.patch
src/nspawn/nspawn.c