aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2018-09-19 19:13:25 -0400
committerKees Cook <keescook@chromium.org>2019-01-08 16:18:42 -0500
commit47008e5161fa097ce9b848dee194b43262b743a5 (patch)
tree4a2e652b63497aef5f1b6d55f7ec24c562617a25 /security
parentbfeffd155283772bbe78c6a05dec7c0128ee500c (diff)
LSM: Introduce LSM_FLAG_LEGACY_MAJOR
This adds a flag for the current "major" LSMs to distinguish them when we have a universal method for ordering all LSMs. It's called "legacy" since the distinction of "major" will go away in the blob-sharing world. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/lsm.c1
-rw-r--r--security/selinux/hooks.c1
-rw-r--r--security/smack/smack_lsm.c1
-rw-r--r--security/tomoyo/tomoyo.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 2c010874329f..e49c50e0d5ab 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -1729,5 +1729,6 @@ alloc_out:
1729 1729
1730DEFINE_LSM(apparmor) = { 1730DEFINE_LSM(apparmor) = {
1731 .name = "apparmor", 1731 .name = "apparmor",
1732 .flags = LSM_FLAG_LEGACY_MAJOR,
1732 .init = apparmor_init, 1733 .init = apparmor_init,
1733}; 1734};
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index f0e36c3492ba..41908d2d6149 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -6999,6 +6999,7 @@ void selinux_complete_init(void)
6999 all processes and objects when they are created. */ 6999 all processes and objects when they are created. */
7000DEFINE_LSM(selinux) = { 7000DEFINE_LSM(selinux) = {
7001 .name = "selinux", 7001 .name = "selinux",
7002 .flags = LSM_FLAG_LEGACY_MAJOR,
7002 .init = selinux_init, 7003 .init = selinux_init,
7003}; 7004};
7004 7005
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 430d4f35e55c..d72d215d7fde 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -4812,5 +4812,6 @@ static __init int smack_init(void)
4812 */ 4812 */
4813DEFINE_LSM(smack) = { 4813DEFINE_LSM(smack) = {
4814 .name = "smack", 4814 .name = "smack",
4815 .flags = LSM_FLAG_LEGACY_MAJOR,
4815 .init = smack_init, 4816 .init = smack_init,
4816}; 4817};
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index 1b5b5097efd7..09f7af130d3a 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -552,5 +552,6 @@ static int __init tomoyo_init(void)
552 552
553DEFINE_LSM(tomoyo) = { 553DEFINE_LSM(tomoyo) = {
554 .name = "tomoyo", 554 .name = "tomoyo",
555 .flags = LSM_FLAG_LEGACY_MAJOR,
555 .init = tomoyo_init, 556 .init = tomoyo_init,
556}; 557};