summaryrefslogtreecommitdiff
path: root/src/user/app/netstack/fs.c
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/netstack/fs.c
parent503d9ff758f8b83295830bdfc8c2ea56837d25e5 (diff)
syscall/open: add the full suite of READ/WRITE flags
Diffstat (limited to 'src/user/app/netstack/fs.c')
-rw-r--r--src/user/app/netstack/fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/user/app/netstack/fs.c b/src/user/app/netstack/fs.c
index d8faadf..ad6c23c 100644
--- a/src/user/app/netstack/fs.c
+++ b/src/user/app/netstack/fs.c
@@ -144,7 +144,8 @@ static void fs_open(handle_t reqh, char *path, int flags) {
}
/* everything below ends up sending packets */
- if (flags & OPEN_RO) respond(NULL, -EACCES);
+ if (!OPEN_WRITEABLE(flags))
+ respond(NULL, -EACCES);
char *save;
const char *verb, *proto, *port_s;