diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-09 18:25:42 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-11-09 18:32:20 +0100 |
commit | 0cc3c9f997d0ea39f0309e74117a033635b2291f (patch) | |
tree | 6542dfeb1ca8e438e09a50d6a83a670b4d509686 | |
parent | d3689b94353d5f29b9d99d80bf6d888bd4eb70cc (diff) | |
download | systemd-0cc3c9f997d0ea39f0309e74117a033635b2291f.tar.gz |
nspawn: copy BindUser= setting from settings only if set
Let's only pick this up from the settings if actually set.
As in the previous commit this makes sure that an empty settings file in
--settings=override mode is really a NOP.
-rw-r--r-- | src/nspawn/nspawn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 25075d2b46..3209b50417 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -4452,7 +4452,8 @@ static int merge_settings(Settings *settings, const char *path) { } } - if ((arg_settings_mask & SETTING_BIND_USER) == 0) + if ((arg_settings_mask & SETTING_BIND_USER) == 0 && + !strv_isempty(settings->bind_user)) strv_free_and_replace(arg_bind_user, settings->bind_user); if ((arg_settings_mask & SETTING_NOTIFY_READY) == 0 && |