1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 04:55:36 +03:00

main: unset some more env vars

This commit is contained in:
Lennart Poettering 2012-04-13 17:36:41 +02:00
parent 44785992c3
commit 9f28b98ec6

View File

@ -1350,6 +1350,12 @@ int main(int argc, char *argv[]) {
unsetenv("SHLVL");
unsetenv("_");
/* When we are invoked by a tool chroot-like such as
* nspawn, these might be set, but make little sense
* to pass on */
unsetenv("USER");
unsetenv("LOGNAME");
/* All other variables are left as is, so that clients
* can still read them via /proc/1/environ */
}