summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/chmod.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-21 16:02:24 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-21 16:02:24 +0200
commitc3351d4b9fc83c731f122de21adf52ef015aecb1 (patch)
tree003ab8dd231db1469f807d5c9cdd2bb33303ac50 /Kernel/Syscalls/chmod.cpp
parent9744dedb5008ee4c20e01166b46bc56fcbdcbd12 (diff)
downloadserenity-c3351d4b9fc83c731f122de21adf52ef015aecb1.zip
Kernel: Make VirtualFileSystem functions take credentials as input
Instead of getting credentials from Process::current(), we now require that they be provided as input to the various VFS functions. This ensures that an atomic set of credentials is used throughout an entire VFS operation.
Diffstat (limited to 'Kernel/Syscalls/chmod.cpp')
-rw-r--r--Kernel/Syscalls/chmod.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/chmod.cpp b/Kernel/Syscalls/chmod.cpp
index c1f2e2fc8d..0b5db76bd3 100644
--- a/Kernel/Syscalls/chmod.cpp
+++ b/Kernel/Syscalls/chmod.cpp
@@ -28,7 +28,7 @@ ErrorOr<FlatPtr> Process::sys$chmod(Userspace<Syscall::SC_chmod_params const*> u
base = base_description->custody();
}
- TRY(VirtualFileSystem::the().chmod(path->view(), params.mode, *base, params.follow_symlinks ? 0 : O_NOFOLLOW_NOERROR));
+ TRY(VirtualFileSystem::the().chmod(credentials(), path->view(), params.mode, *base, params.follow_symlinks ? 0 : O_NOFOLLOW_NOERROR));
return 0;
}