summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include
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/include
parent99cc45e486786c7215a7e39824c3bbaf7cf2fc08 (diff)
downloadop-kernel-dev-a4c3f89c9b5a9fab5a8e4ea05399acd6e23072df.zip
op-kernel-dev-a4c3f89c9b5a9fab5a8e4ea05399acd6e23072df.tar.gz
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 'security/apparmor/include')
-rw-r--r--security/apparmor/include/secid.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/apparmor/include/secid.h b/security/apparmor/include/secid.h
index 686de8e..dee6fa3 100644
--- a/security/apparmor/include/secid.h
+++ b/security/apparmor/include/secid.h
@@ -28,8 +28,10 @@ int apparmor_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid);
void apparmor_release_secctx(char *secdata, u32 seclen);
-u32 aa_alloc_secid(struct aa_label *label, gfp_t gfp);
+int aa_alloc_secid(struct aa_label *label, gfp_t gfp);
void aa_free_secid(u32 secid);
void aa_secid_update(u32 secid, struct aa_label *label);
+void aa_secids_init(void);
+
#endif /* __AA_SECID_H */
OpenPOWER on IntegriCloud