nspawn: set container_host env vars before user arguments

Allows users on the command line to seamlessly override
$container_host_* just like they can override $container_id and
$container
This commit is contained in:
Luca Boccassi 2020-07-19 13:11:52 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent a9c9b18a95
commit ed4512d009
1 changed files with 1 additions and 1 deletions

View File

@ -3191,7 +3191,7 @@ static int inner_child(
if (asprintf((char **)(envp + n_env++), "NOTIFY_SOCKET=%s", NSPAWN_NOTIFY_SOCKET_PATH) < 0)
return log_oom();
env_use = strv_env_merge(3, envp, arg_setenv, os_release_pairs);
env_use = strv_env_merge(3, envp, os_release_pairs, arg_setenv);
if (!env_use)
return log_oom();