do not pass-along the environment from the kernel or initrd

This commit is contained in:
Kay Sievers 2013-07-30 02:02:45 +02:00
parent 82659fd757
commit ce8aba5681

View 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);
}