1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

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
parent 7d4a267504
commit 6466c3d750
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();