@@ -2039,8 +2039,11 @@ extern char *lsm_names;
extern void security_add_hooks(struct security_hook_list *hooks, int count,
char *lsm);
+#define LSM_FLAG_LEGACY_MAJOR BIT(0)
+
struct lsm_info {
const char *name; /* Required. */
+ unsigned long flags; /* Optional: flags describing LSM */
int (*init)(void); /* Required. */
};
@@ -1608,5 +1608,6 @@ static int __init apparmor_init(void)
DEFINE_LSM(apparmor) = {
.name = "apparmor",
+ .flags = LSM_FLAG_LEGACY_MAJOR,
.init = apparmor_init,
};
@@ -7204,6 +7204,7 @@ void selinux_complete_init(void)
all processes and objects when they are created. */
DEFINE_LSM(selinux) = {
.name = "selinux",
+ .flags = LSM_FLAG_LEGACY_MAJOR,
.init = selinux_init,
};
@@ -4884,5 +4884,6 @@ static __init int smack_init(void)
*/
DEFINE_LSM(smack) = {
.name = "smack",
+ .flags = LSM_FLAG_LEGACY_MAJOR,
.init = smack_init,
};
@@ -552,5 +552,6 @@ static int __init tomoyo_init(void)
DEFINE_LSM(tomoyo) = {
.name = "tomoyo",
+ .flags = LSM_FLAG_LEGACY_MAJOR,
.init = tomoyo_init,
};