]> err.no Git - systemd/commitdiff
systemd: unset HOME and TERM set from the kernel
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Oct 2010 19:05:04 +0000 (21:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Oct 2010 19:05:04 +0000 (21:05 +0200)
src/main.c

index 88ba09d43e51a1355d3cbe00620e7bc22ae19dd1..9a51a9187ffe03a2c1b5c01d6b96a6a671180273 100644 (file)
@@ -973,6 +973,11 @@ int main(int argc, char *argv[]) {
                "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                arg_running_as == MANAGER_SYSTEM);
 
+        /* Unset some environment variables passed in from the kernel
+         * that don't really make sense for us. */
+        unsetenv("HOME");
+        unsetenv("TERM");
+
         /* Move out of the way, so that we won't block unmounts */
         assert_se(chdir("/")  == 0);