diff --git a/builtin-setup.c b/builtin-setup.c index 11aa676..1b865b7 100644 --- a/builtin-setup.c +++ b/builtin-setup.c @@ -116,6 +116,7 @@ static const char *guestfs_dirs[] = { "/var", "/var/lib", "/virt", + "/virt/home", }; static const char *guestfs_symlinks[] = { diff --git a/guest/init.c b/guest/init.c index e1f377f..ece48fd 100644 --- a/guest/init.c +++ b/guest/init.c @@ -12,7 +12,8 @@ static int run_process(char *filename) { char *new_argv[] = { filename, NULL }; - char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", NULL }; + char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", + "HOME=/virt/home", NULL }; return execve(filename, new_argv, new_env); } @@ -20,7 +21,7 @@ static int run_process(char *filename) static int run_process_sandbox(char *filename) { char *new_argv[] = { filename, "/virt/sandbox.sh", NULL }; - char *new_env[] = { "TERM=linux", NULL }; + char *new_env[] = { "TERM=linux", "HOME=/virt/home", NULL }; return execve(filename, new_argv, new_env); }