mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
main: unset some bash specific environment variables that might get leaked to us
https://bugzilla.redhat.com/show_bug.cgi?id=811537
This commit is contained in:
parent
71ecc858fa
commit
9543ad1663
@ -1343,6 +1343,12 @@ int main(int argc, char *argv[]) {
|
||||
unsetenv("HOME");
|
||||
unsetenv("TERM");
|
||||
|
||||
/* When we are invoked by a shell, these might be set,
|
||||
* but make little sense to pass on */
|
||||
unsetenv("PWD");
|
||||
unsetenv("SHLVL");
|
||||
unsetenv("_");
|
||||
|
||||
/* 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