From: Kay Sievers Date: Tue, 30 Jul 2013 00:02:45 +0000 (+0200) Subject: do not pass-along the environment from the kernel or initrd X-Git-Tag: v207~218 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ce8aba568156f2b9d0d3b023e960cda3d9d7db81;p=elogind.git do not pass-along the environment from the kernel or initrd --- 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); }