From 0e7410112964168a65578002269ae3b80b207936 Mon Sep 17 00:00:00 2001 From: Konstantin Meskhidze Date: Thu, 26 Oct 2023 09:47:44 +0800 Subject: landlock: Move and rename layer helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Link: https://lore.kernel.org/r/20231026014751.414649-6-konstantin.meskhidze@huawei.com Signed-off-by: Mickaël Salaün --- security/landlock/ruleset.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'security/landlock/ruleset.h') 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 */ -- cgit v1.2.3