do not pass-along the environment from the kernel or initrd
authorKay Sievers <kay@vrfy.org>
Tue, 30 Jul 2013 00:02:45 +0000 (02:02 +0200)
committerKay Sievers <kay@vrfy.org>
Tue, 30 Jul 2013 00:07:50 +0000 (02:07 +0200)
src/core/main.c

index 91cbee2..8a73ad3 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);
                 }