diff options
Diffstat (limited to 'src/core/main.c')
-rw-r--r-- | src/core/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index 91cbee2e59..8a73ad3cc7 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); } |