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:
parent
44785992c3
commit
9f28b98ec6
@ -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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user