aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/lsm.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2018-06-04 19:44:59 -0700
committerJohn Johansen <john.johansen@canonical.com>2018-06-07 01:50:49 -0700
commita4c3f89c9b5a9fab5a8e4ea05399acd6e23072df (patch)
tree7a92b037adce16071b0ca0207115b7d8f434c5c6 /security/apparmor/lsm.c
parentapparmor: Use an IDR to allocate apparmor secids (diff)
downloadlinux-dev-a4c3f89c9b5a9fab5a8e4ea05399acd6e23072df.tar.xz
linux-dev-a4c3f89c9b5a9fab5a8e4ea05399acd6e23072df.zip
apparmor: fixup secid map conversion to using IDR
The IDR conversion did not handle an error case for when allocating a mapping fails, and it did not ensure that mappings did not allocate or use a 0 value, which is used as an invalid secid. Which is used when a mapping fails. Fixes: 3ae7eb49a2be ("apparmor: Use an IDR to allocate apparmor secids") Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to '')
-rw-r--r--security/apparmor/lsm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 10bf36aa477d..e35d12883990 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -1547,6 +1547,8 @@ static int __init apparmor_init(void)
return 0;
}
+ aa_secids_init();
+
error = aa_setup_dfa_engine();
if (error) {
AA_ERROR("Unable to setup dfa engine\n");