@@ -14,11 +14,6 @@
#include "ruleset.h"
#include "setup.h"
-static struct lsm_id landlock_lsmid __lsm_ro_after_init = {
- .lsm = "landlock",
- .slot = LSMBLOB_NEEDED
-};
-
static int hook_cred_prepare(struct cred *const new,
const struct cred *const old, const gfp_t gfp)
{
@@ -38,11 +38,6 @@
#include "ruleset.h"
#include "setup.h"
-static struct lsm_id landlock_lsmid __lsm_ro_after_init = {
- .lsm = "landlock",
- .slot = LSMBLOB_NEEDED
-};
-
/* Underlying object management */
static void release_inode(struct landlock_object *const object)
@@ -20,11 +20,6 @@
#include "ruleset.h"
#include "setup.h"
-static struct lsm_id landlock_lsmid __lsm_ro_after_init = {
- .lsm = "landlock",
- .slot = LSMBLOB_NEEDED
-};
-
/**
* domain_scope_le - Checks domain ordering for scoped ptrace
*
@@ -23,6 +23,11 @@ struct lsm_blob_sizes landlock_blob_sizes __lsm_ro_after_init = {
.lbs_superblock = sizeof(struct landlock_superblock_security),
};
+struct lsm_id landlock_lsmid __lsm_ro_after_init = {
+ .lsm = LANDLOCK_NAME,
+ .slot = LSMBLOB_NOT_NEEDED,
+};
+
static int __init landlock_init(void)
{
landlock_add_cred_hooks();
@@ -14,5 +14,6 @@
extern bool landlock_initialized;
extern struct lsm_blob_sizes landlock_blob_sizes;
+extern struct lsm_id landlock_lsmid;
#endif /* _SECURITY_LANDLOCK_SETUP_H */