]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: restore the original environment passed by the kernel when switching to a new...
authorFranck Bui <fbui@suse.com>
Tue, 1 Oct 2019 12:31:14 +0000 (14:31 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 3 Oct 2019 20:08:13 +0000 (22:08 +0200)
commita5cede8c24fddda9b73f142e09b18b49adde1b9c
tree3f34650eb418af0322d2591f40ee545e4ff41d54
parent694566454a42c08e791b3b8118351bdb6c0b96d2
pid1: restore the original environment passed by the kernel when switching to a new system manager

PID1 may modified the environment passed by the kernel when it starts
running. Commit 9d48671c62de133a2b9fe7c31e70c0ff8e68f2db unset $HOME for
example.

In case PID1 is going to switch to a new root and execute a new system manager
which is not systemd, we should restore the original environment as the new
manager might expect some variables to be set by default (more specifically
$HOME).
src/basic/util.c
src/basic/util.h
src/core/main.c