1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

systemd: unset HOME and TERM set from the kernel

This commit is contained in:
Lennart Poettering 2010-10-25 21:05:04 +02:00
parent 306a7fd82e
commit 1104f3c160

View File

@ -973,6 +973,11 @@ int main(int argc, char *argv[]) {
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
arg_running_as == MANAGER_SYSTEM);
/* Unset some environment variables passed in from the kernel
* that don't really make sense for us. */
unsetenv("HOME");
unsetenv("TERM");
/* Move out of the way, so that we won't block unmounts */
assert_se(chdir("/") == 0);