summaryrefslogtreecommitdiff
path: root/security/landlock/ruleset.h
diff options
context:
space:
mode:
authorKonstantin Meskhidze <konstantin.meskhidze@huawei.com>2023-10-26 04:47:44 +0300
committerMickaël Salaün <mic@digikod.net>2023-10-26 22:07:13 +0300
commit0e7410112964168a65578002269ae3b80b207936 (patch)
treeaedfb6183ad6496f279b01cd5662c43f1921676a /security/landlock/ruleset.h
parent6146b6141770206792d0e1155794cc48697c7985 (diff)
downloadlinux-0e7410112964168a65578002269ae3b80b207936.tar.xz
landlock: Move and rename layer helpers
Move and rename landlock_unmask_layers() and landlock_init_layer_masks() helpers to ruleset.c to share them with Landlock network implementation in following commits. Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com> Link: https://lore.kernel.org/r/20231026014751.414649-6-konstantin.meskhidze@huawei.com Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'security/landlock/ruleset.h')
-rw-r--r--security/landlock/ruleset.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/security/landlock/ruleset.h b/security/landlock/ruleset.h
index 9e04c666b23c..760e049f3e0a 100644
--- a/security/landlock/ruleset.h
+++ b/security/landlock/ruleset.h
@@ -267,4 +267,14 @@ landlock_get_fs_access_mask(const struct landlock_ruleset *const ruleset,
LANDLOCK_ACCESS_FS_INITIALLY_DENIED;
}
+bool landlock_unmask_layers(
+ const struct landlock_rule *const rule,
+ const access_mask_t access_request,
+ layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS]);
+
+access_mask_t landlock_init_layer_masks(
+ const struct landlock_ruleset *const domain,
+ const access_mask_t access_request,
+ layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS]);
+
#endif /* _SECURITY_LANDLOCK_RULESET_H */