summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/crypto.h
diff options
context:
space:
mode:
authorJohn Johansen2017-01-16 09:42:55 +0100
committerJohn Johansen2017-01-16 10:18:42 +0100
commit5ac8c355ae0013d82b3a07b49aebeadfce9b6e52 (patch)
tree41f24f5f9198ef4ba7a34624938e51b2305e21f0 /security/apparmor/include/crypto.h
parentapparmor: add ns name to the audit data for policy loads (diff)
downloadkernel-qcow2-linux-5ac8c355ae0013d82b3a07b49aebeadfce9b6e52.tar.gz
kernel-qcow2-linux-5ac8c355ae0013d82b3a07b49aebeadfce9b6e52.tar.xz
kernel-qcow2-linux-5ac8c355ae0013d82b3a07b49aebeadfce9b6e52.zip
apparmor: allow introspecting the loaded policy pre internal transform
Store loaded policy and allow introspecting it through apparmorfs. This has several uses from debugging, policy validation, and policy checkpoint and restore for containers. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/crypto.h')
-rw-r--r--security/apparmor/include/crypto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/apparmor/include/crypto.h b/security/apparmor/include/crypto.h
index dc418e5024d9..c1469f8db174 100644
--- a/security/apparmor/include/crypto.h
+++ b/security/apparmor/include/crypto.h
@@ -18,9 +18,14 @@
#ifdef CONFIG_SECURITY_APPARMOR_HASH
unsigned int aa_hash_size(void);
+char *aa_calc_hash(void *data, size_t len);
int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start,
size_t len);
#else
+static inline char *aa_calc_hash(void *data, size_t len)
+{
+ return NULL;
+}
static inline int aa_calc_profile_hash(struct aa_profile *profile, u32 version,
void *start, size_t len)
{