From ce8aba568156f2b9d0d3b023e960cda3d9d7db81 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 30 Jul 2013 02:02:45 +0200 Subject: [PATCH] do not pass-along the environment from the kernel or initrd --- src/core/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index 91cbee2e5..8a73ad3cc 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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); } -- 2.30.2