From 12b194b60c7f4221caffd9bb14b44c952f3e1b53 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Sun, 21 Jul 2024 15:20:33 +0200 Subject: user_init.c: set HOME Signed-off-by: Anna (navi) Figueiredo Gomes --- src/user_init/user_init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/user_init/user_init.c b/src/user_init/user_init.c index 8e006ea9..9d21f39e 100644 --- a/src/user_init/user_init.c +++ b/src/user_init/user_init.c @@ -21,6 +21,7 @@ int main(int argc, char **argv) { || setuid(user->pw_uid) == -1) return 1; + setenv("HOME", user->pw_dir, true); xasprintf(&cmd, "%s %s", USERINIT, argv[2]); execl(user->pw_shell, user->pw_shell, "-c", cmd, NULL); } -- cgit v1.2.3