exec: Respect the program's working directory

This commit is contained in:
apio 2023-04-11 22:44:25 +02:00
parent 3a45f4af53
commit 7db215819e
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -41,7 +41,7 @@ Result<u64> sys_execve(Registers* regs, SyscallArgs args)
// FIXME: Make sure argv & envp are not too big. // FIXME: Make sure argv & envp are not too big.
auto inode = TRY(VFS::resolve_path(path.chars(), current->auth)); auto inode = TRY(VFS::resolve_path(path.chars(), current->auth, current->current_directory));
if (!VFS::can_execute(inode, current->auth)) return err(EACCES); if (!VFS::can_execute(inode, current->auth)) return err(EACCES);