summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2020-01-19 01:04:48 +0300
committerAndreas Kling <kling@serenityos.org>2020-01-18 23:51:22 +0100
commit6466c3d750da0ddc46498c4e90f8ff8b0972ca65 (patch)
tree5dca8192e86dea86fb0d1f5273dcda83b5fc5dce /Kernel/Process.cpp
parent7d4a2675042a7ea982f604512f25c2f81a7e87df (diff)
downloadserenity-6466c3d750da0ddc46498c4e90f8ff8b0972ca65.zip
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
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index f1cda814f3..ca8c1caceb 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -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();