summaryrefslogtreecommitdiff
path: root/src/user/app/login
diff options
context:
space:
mode:
authordzwdz2022-10-02 19:25:17 +0200
committerdzwdz2022-10-02 19:25:17 +0200
commit710e9b2b5c16f74f66420c66d12455ad518d42c7 (patch)
tree82b88cc07ef3f122512354d649af68584bd4da4d /src/user/app/login
parent503d9ff758f8b83295830bdfc8c2ea56837d25e5 (diff)
syscall/open: add the full suite of READ/WRITE flags
Diffstat (limited to 'src/user/app/login')
-rw-r--r--src/user/app/login/login.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/app/login/login.c b/src/user/app/login/login.c
index 5d9eb36..af6e19c 100644
--- a/src/user/app/login/login.c
+++ b/src/user/app/login/login.c
@@ -44,8 +44,10 @@ static void drv(const char *user) {
forward_open(reqh, buf, req.len, req.flags);
} else if (segcmp(buf, 1, "Users") && segcmp(buf, 3, "private")) { // /Users/*/private/**
_syscall_fs_respond(reqh, NULL, -EACCES, 0);
+ } else if (!OPEN_WRITEABLE(req.flags)) {
+ forward_open(reqh, buf, req.len, req.flags);
} else {
- forward_open(reqh, buf, req.len, req.flags | OPEN_RO);
+ _syscall_fs_respond(reqh, NULL, -EACCES, 0);
}
break;