forked from Bananymous/banan-os
Userspace: init now sets HOME environment variable and cd's into HOME
This commit is contained in:
parent
f09b82c4b5
commit
048183ddb5
|
@ -144,6 +144,9 @@ int main()
|
||||||
if (setuid(user.uid) == -1)
|
if (setuid(user.uid) == -1)
|
||||||
perror("setuid");
|
perror("setuid");
|
||||||
|
|
||||||
|
setenv("HOME", user.home.data(), 1);
|
||||||
|
chdir(user.home.data());
|
||||||
|
|
||||||
execl(user.shell.data(), user.shell.data(), nullptr);
|
execl(user.shell.data(), user.shell.data(), nullptr);
|
||||||
perror("execl");
|
perror("execl");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue