Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit bd9aac7

Browse files
authored
Merge pull request #255 from amshinde/clearenv-hyper
Clear the environment before setting container environment.
2 parents 2bff516 + 328398f commit bd9aac7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/exec.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ static int hyper_do_exec_cmd(struct hyper_exec *exec, int pipe, struct stdio_con
510510
goto out;
511511
}
512512

513+
// Make sure we start with a clean environment
514+
clearenv();
515+
513516
// set early env. the container env config can overwrite it
514517
setenv("HOME", "/root", 1);
515518
setenv("HOSTNAME", exec->pod->hostname, 1);

0 commit comments

Comments
 (0)