diff options
Diffstat (limited to 'src/user/lib/fs/misc.c')
-rw-r--r-- | src/user/lib/fs/misc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/user/lib/fs/misc.c b/src/user/lib/fs/misc.c index 16e95e7..038cd3b 100644 --- a/src/user/lib/fs/misc.c +++ b/src/user/lib/fs/misc.c @@ -87,6 +87,10 @@ void fs_whitelist(const char **list) { for (const char **iter = list; *iter; iter++) { size_t len = strlen(*iter); + if (len >= 3 && !memcmp(*iter + len - 3, ":ro", 3)) { + res.flags = res.flags | OPEN_RO; + len -= 3; + } if (len <= res.len && !memcmp(buf, *iter, len)) { passthru = true; break; |