chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4478599
)
main: unset some more env vars
author
Lennart Poettering
<lennart@poettering.net>
Fri, 13 Apr 2012 15:36:41 +0000
(17:36 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 13 Apr 2012 16:52:53 +0000
(18:52 +0200)
src/core/main.c
patch
|
blob
|
history
diff --git
a/src/core/main.c
b/src/core/main.c
index 9db83aa2e534c73c39db002a6121c2ca5ec08cf6..9bcedbe71f6e0657f580782ac884b774537c2787 100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-1350,6
+1350,12
@@
int main(int argc, char *argv[]) {
unsetenv("SHLVL");
unsetenv("_");
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 */
}
/* All other variables are left as is, so that clients
* can still read them via /proc/1/environ */
}