From a5ca3b39953977842b819090c391b7fc432e2a82 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Wed, 20 Mar 2024 17:37:20 +0200 Subject: [PATCH] Add check for file existence in linux_access function --- syscalls/linux.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/syscalls/linux.cpp b/syscalls/linux.cpp index de734c8..9c40690 100644 --- a/syscalls/linux.cpp +++ b/syscalls/linux.cpp @@ -567,6 +567,11 @@ static int linux_access(SysFrm *, const char *pathname, int mode) if (pPathname == nullptr) return -EFAULT; + debug("access(%s, %d)", (char *)pPathname, mode); + + if (!fs->PathExists(pPathname, pcb->CurrentWorkingDirectory)) + return -ENOENT; + stub; fixme("access(%s, %d)", (char *)pPathname, mode); return 0;