Kernel: Pass correct permission flags when opening files

Right now, permission flags passed to VFS::open() are effectively ignored, but
that is going to change.

* O_RDONLY is 0, but it's still nicer to pass it explicitly
* POSIX says that binding a Unix socket to a symlink shall fail with EADDRINUSE
This commit is contained in:
Sergey Bugaev 2020-01-19 01:04:48 +03:00 committed by Andreas Kling
commit 6466c3d750
Notes: sideshowbarker 2024-07-19 09:58:36 +09:00
4 changed files with 35 additions and 4 deletions

View file

@ -182,7 +182,7 @@ void dump_backtrace()
void load_ksyms()
{
auto result = VFS::the().open("/res/kernel.map", 0, 0, VFS::the().root_custody());
auto result = VFS::the().open("/res/kernel.map", O_RDONLY, 0, VFS::the().root_custody());
ASSERT(!result.is_error());
auto description = result.value();
auto buffer = description->read_entire_file();