chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: remove redundant entries from logind's default controller lists too
[elogind.git]
/
src
/
core
/
main.c
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 */
}