LSM: Identify modules by more than name
[linux-2.6-microblaze.git] / security / landlock / setup.c
index 3e11d30..f6dd331 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/init.h>
 #include <linux/lsm_hooks.h>
+#include <uapi/linux/lsm.h>
 
 #include "common.h"
 #include "cred.h"
@@ -25,6 +26,11 @@ struct lsm_blob_sizes landlock_blob_sizes __ro_after_init = {
        .lbs_superblock = sizeof(struct landlock_superblock_security),
 };
 
+const struct lsm_id landlock_lsmid = {
+       .name = LANDLOCK_NAME,
+       .id = LSM_ID_LANDLOCK,
+};
+
 static int __init landlock_init(void)
 {
        landlock_add_cred_hooks();