summaryrefslogtreecommitdiff
path: root/security/landlock/ruleset.h
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2025-03-20 20:06:52 +0100
committerMickaël Salaün <mic@digikod.net>2025-03-26 13:59:34 +0100
commit5b95b329befaf18020a0d3cd0223a90bd230eeb9 (patch)
tree704e85371612460bb94623b64e2fb9bf6f748d37 /security/landlock/ruleset.h
parentd9d2a68ed44bbae598a81cb95e0746fa6b13b57f (diff)
downloadlinux-next-5b95b329befaf18020a0d3cd0223a90bd230eeb9.tar.gz
linux-next-5b95b329befaf18020a0d3cd0223a90bd230eeb9.zip
landlock: Move domain hierarchy management
Create a new domain.h file containing the struct landlock_hierarchy definition and helpers. This type will grow with audit support. This also prepares for a new domain type. Cc: Günther Noack <gnoack@google.com> Link: https://lore.kernel.org/r/20250320190717.2287696-4-mic@digikod.net Reviewed-by: Günther Noack <gnoack3000@gmail.com> Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'security/landlock/ruleset.h')
-rw-r--r--security/landlock/ruleset.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/security/landlock/ruleset.h b/security/landlock/ruleset.h
index 52f4f0af6ab0..bbb5996545d2 100644
--- a/security/landlock/ruleset.h
+++ b/security/landlock/ruleset.h
@@ -17,6 +17,7 @@
#include <linux/workqueue.h>
#include "access.h"
+#include "domain.h"
#include "limits.h"
#include "object.h"
@@ -109,22 +110,6 @@ struct landlock_rule {
};
/**
- * struct landlock_hierarchy - Node in a ruleset hierarchy
- */
-struct landlock_hierarchy {
- /**
- * @parent: Pointer to the parent node, or NULL if it is a root
- * Landlock domain.
- */
- struct landlock_hierarchy *parent;
- /**
- * @usage: Number of potential children domains plus their parent
- * domain.
- */
- refcount_t usage;
-};
-
-/**
* struct landlock_ruleset - Landlock ruleset
*
* This data structure must contain unique entries, be updatable, and quick to