Userspace: init now sets HOME environment variable and cd's into HOME

This commit is contained in:
Bananymous 2023-06-12 01:26:10 +03:00
parent f09b82c4b5
commit 048183ddb5
1 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,9 @@ int main()
if (setuid(user.uid) == -1)
perror("setuid");
setenv("HOME", user.home.data(), 1);
chdir(user.home.data());
execl(user.shell.data(), user.shell.data(), nullptr);
perror("execl");