summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/InodeMetadata.h
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/FileSystem/InodeMetadata.h
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/FileSystem/InodeMetadata.h')
-rw-r--r--Kernel/FileSystem/InodeMetadata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/FileSystem/InodeMetadata.h b/Kernel/FileSystem/InodeMetadata.h
index 93e5ed2742..685e38e4aa 100644
--- a/Kernel/FileSystem/InodeMetadata.h
+++ b/Kernel/FileSystem/InodeMetadata.h
@@ -42,6 +42,10 @@ struct InodeMetadata {
bool may_write(Process const&) const;
bool may_execute(Process const&) const;
+ bool may_read(Credentials const&) const;
+ bool may_write(Credentials const&) const;
+ bool may_execute(Credentials const&) const;
+
bool may_read(UserID u, GroupID g, Span<GroupID const> eg) const
{
if (u == 0)