summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/InodeMetadata.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-19 22:20:43 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-20 17:20:44 +0200
commitbec314611d19408047a14f14349af4abf2578730 (patch)
treef0c9dcba215121b297567958d419de28cedf0947 /Kernel/FileSystem/InodeMetadata.cpp
parent11eee67b8510767d76fb4793e3b62ac1793dd723 (diff)
downloadserenity-bec314611d19408047a14f14349af4abf2578730.zip
Kernel: Move InodeMetadata methods out of line
Diffstat (limited to 'Kernel/FileSystem/InodeMetadata.cpp')
-rw-r--r--Kernel/FileSystem/InodeMetadata.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/Kernel/FileSystem/InodeMetadata.cpp b/Kernel/FileSystem/InodeMetadata.cpp
new file mode 100644
index 0000000000..ec112ac6b6
--- /dev/null
+++ b/Kernel/FileSystem/InodeMetadata.cpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <Kernel/FileSystem/InodeMetadata.h>
+#include <Kernel/Process.h>
+
+namespace Kernel {
+
+bool InodeMetadata::may_read(Process const& process) const
+{
+ return may_read(process.euid(), process.egid(), process.extra_gids());
+}
+
+bool InodeMetadata::may_write(Process const& process) const
+{
+ return may_write(process.euid(), process.egid(), process.extra_gids());
+}
+
+bool InodeMetadata::may_execute(Process const& process) const
+{
+ return may_execute(process.euid(), process.egid(), process.extra_gids());
+}
+
+}