diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-04-13 17:36:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-04-13 18:52:53 +0200 |
commit | 9f28b98ec6461b4e06edd1e149c1ee5e9dcc4be0 (patch) | |
tree | 95a4084a117f64cb259a9bee2a84aec14a41ce89 | |
parent | 44785992c3c32e6abbf9d9345e0d68d579ef165b (diff) |
main: unset some more env vars
-rw-r--r-- | src/core/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index 9db83aa2e5..9bcedbe71f 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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 */ } |