mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +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:
parent
7d4a267504
commit
6466c3d750
4 changed files with 35 additions and 4 deletions
|
@ -4222,7 +4222,7 @@ int Process::sys$module_load(const char* user_path, size_t path_length)
|
|||
auto path = get_syscall_path_argument(user_path, path_length);
|
||||
if (path.is_error())
|
||||
return path.error();
|
||||
auto description_or_error = VFS::the().open(path.value(), 0, 0, current_directory());
|
||||
auto description_or_error = VFS::the().open(path.value(), O_RDONLY, 0, current_directory());
|
||||
if (description_or_error.is_error())
|
||||
return description_or_error.error();
|
||||
auto& description = description_or_error.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue