diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-19 22:20:43 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-20 17:20:44 +0200 |
commit | bec314611d19408047a14f14349af4abf2578730 (patch) | |
tree | f0c9dcba215121b297567958d419de28cedf0947 /Kernel/FileSystem/InodeMetadata.cpp | |
parent | 11eee67b8510767d76fb4793e3b62ac1793dd723 (diff) | |
download | serenity-bec314611d19408047a14f14349af4abf2578730.zip |
Kernel: Move InodeMetadata methods out of line
Diffstat (limited to 'Kernel/FileSystem/InodeMetadata.cpp')
-rw-r--r-- | Kernel/FileSystem/InodeMetadata.cpp | 27 |
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()); +} + +} |