chiark / gitweb /
logind: restore logic to kill user processes when session ends
[elogind.git] / src / core / main.c
index 91cbee2e5907c47e580e8d71bba43048dc705f32..8a73ad3cc798a29344d5bc63b2cf50d1cc22bbf4 100644 (file)
@@ -1776,6 +1776,10 @@ finish:
                         args[i++] = sfd;
                         args[i++] = NULL;
 
+                        /* do not pass along the environment we inherit from the kernel or initrd */
+                        if (switch_root_dir)
+                                clearenv();
+
                         assert(i <= args_size);
                         execv(args[0], (char* const*) args);
                 }