1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-22 17:57:49 +03:00

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.
This commit is contained in:
Lennart Poettering 2021-11-09 18:25:42 +01:00
parent d3689b9435
commit 0cc3c9f997

View File

@ -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 &&