Kernel/LibC: remove PATH resoltion from kernel

I have no idea why I had made PATH environment variable parsing
to be part of the kernel. Now the shell does the parsing and
environment syscall is no longer needed.
This commit is contained in:
Bananymous
2023-09-23 02:43:02 +03:00
parent 7a7c5e433e
commit 3ba15b41a3
8 changed files with 73 additions and 71 deletions

View File

@@ -74,6 +74,8 @@ int main()
if (setuid(pwd->pw_uid) == -1)
perror("setuid");
setenv("PATH", "/bin:/usr/bin", 0);
setenv("HOME", pwd->pw_dir, 1);
chdir(pwd->pw_dir);