diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-07-21 15:20:33 +0200 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-07-21 15:20:33 +0200 |
commit | 12b194b60c7f4221caffd9bb14b44c952f3e1b53 (patch) | |
tree | d7ed6bfb3cc042f825e6169bf93feb33f17448b9 /src | |
parent | 0dcc569a2e553bcbd008b03e6c4551fcdeed088c (diff) |
user_init.c: set HOME
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'src')
-rw-r--r-- | src/user_init/user_init.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |