apps+base+libc: Use /usr/bin paths instead of /bin everywhere
This commit is contained in:
parent
3c9b2c49aa
commit
c5e11bb6cf
@ -45,7 +45,7 @@ Result<int> luna_main(int argc, char** argv)
|
||||
username = name.view();
|
||||
}
|
||||
|
||||
execl("/bin/su", "login", "-lp", "--", username.chars(), nullptr);
|
||||
execl("/usr/bin/su", "login", "-lp", "--", username.chars(), nullptr);
|
||||
|
||||
perror("su");
|
||||
return 1;
|
||||
|
@ -72,10 +72,9 @@ int main()
|
||||
// Now, mount the /dev file system on the new root.
|
||||
mount_devfs();
|
||||
|
||||
setenv("PATH", "/sbin:/usr/bin", 1);
|
||||
char* argv[] = { "init", nullptr };
|
||||
char* argv[] = { "/usr/bin/init", nullptr };
|
||||
char* envp[] = { nullptr };
|
||||
execvpe(argv[0], argv, envp);
|
||||
execve(argv[0], argv, envp);
|
||||
|
||||
fail_errno("Failed to execute init");
|
||||
|
||||
|
@ -127,7 +127,7 @@ Result<int> luna_main(int argc, char** argv)
|
||||
{
|
||||
chdir(entry->pw_dir);
|
||||
clearenv();
|
||||
setenv("PATH", "/bin:/sbin", 1);
|
||||
setenv("PATH", "/usr/bin:/usr/local/bin", 1);
|
||||
setpgid(0, 0);
|
||||
}
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
root:toor:0:0:Administrator:/:/bin/sh
|
||||
selene:moon:1000:1000:User:/home/selene:/bin/sh
|
||||
root:toor:0:0:Administrator:/:/usr/bin/sh
|
||||
selene:moon:1000:1000:User:/home/selene:/usr/bin/sh
|
||||
|
@ -23,7 +23,7 @@ static Result<int> try_execvpe(const char* name, char* const* argv, char* const*
|
||||
if (strchr(name, '/')) return execve(name, argv, envp);
|
||||
|
||||
char* path = getenv("PATH");
|
||||
if (!path) path = const_cast<char*>("/bin:/sbin");
|
||||
if (!path) path = const_cast<char*>("/usr/bin:/usr/local/bin");
|
||||
|
||||
Vector<String> paths = TRY(StringView { path }.split(":"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user