diff options
Diffstat (limited to 'security/apparmor/include')
-rw-r--r-- | security/apparmor/include/apparmorfs.h | 1 | ||||
-rw-r--r-- | security/apparmor/include/crypto.h | 36 | ||||
-rw-r--r-- | security/apparmor/include/policy.h | 1 |
3 files changed, 38 insertions, 0 deletions
diff --git a/security/apparmor/include/apparmorfs.h b/security/apparmor/include/apparmorfs.h index f91712cf1b30..414e56878dd0 100644 --- a/security/apparmor/include/apparmorfs.h +++ b/security/apparmor/include/apparmorfs.h | |||
@@ -82,6 +82,7 @@ enum aafs_prof_type { | |||
82 | AAFS_PROF_NAME, | 82 | AAFS_PROF_NAME, |
83 | AAFS_PROF_MODE, | 83 | AAFS_PROF_MODE, |
84 | AAFS_PROF_ATTACH, | 84 | AAFS_PROF_ATTACH, |
85 | AAFS_PROF_HASH, | ||
85 | AAFS_PROF_SIZEOF, | 86 | AAFS_PROF_SIZEOF, |
86 | }; | 87 | }; |
87 | 88 | ||
diff --git a/security/apparmor/include/crypto.h b/security/apparmor/include/crypto.h new file mode 100644 index 000000000000..dc418e5024d9 --- /dev/null +++ b/security/apparmor/include/crypto.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * AppArmor security module | ||
3 | * | ||
4 | * This file contains AppArmor policy loading interface function definitions. | ||
5 | * | ||
6 | * Copyright 2013 Canonical Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License as | ||
10 | * published by the Free Software Foundation, version 2 of the | ||
11 | * License. | ||
12 | */ | ||
13 | |||
14 | #ifndef __APPARMOR_CRYPTO_H | ||
15 | #define __APPARMOR_CRYPTO_H | ||
16 | |||
17 | #include "policy.h" | ||
18 | |||
19 | #ifdef CONFIG_SECURITY_APPARMOR_HASH | ||
20 | unsigned int aa_hash_size(void); | ||
21 | int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start, | ||
22 | size_t len); | ||
23 | #else | ||
24 | static inline int aa_calc_profile_hash(struct aa_profile *profile, u32 version, | ||
25 | void *start, size_t len) | ||
26 | { | ||
27 | return 0; | ||
28 | } | ||
29 | |||
30 | static inline unsigned int aa_hash_size(void) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | #endif | ||
35 | |||
36 | #endif /* __APPARMOR_CRYPTO_H */ | ||
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h index 59b36372ae40..f2d4b6348cbc 100644 --- a/security/apparmor/include/policy.h +++ b/security/apparmor/include/policy.h | |||
@@ -219,6 +219,7 @@ struct aa_profile { | |||
219 | struct aa_caps caps; | 219 | struct aa_caps caps; |
220 | struct aa_rlimit rlimits; | 220 | struct aa_rlimit rlimits; |
221 | 221 | ||
222 | unsigned char *hash; | ||
222 | char *dirname; | 223 | char *dirname; |
223 | struct dentry *dents[AAFS_PROF_SIZEOF]; | 224 | struct dentry *dents[AAFS_PROF_SIZEOF]; |
224 | }; | 225 | }; |