diff options
author | John Johansen <john.johansen@canonical.com> | 2014-10-24 20:16:14 +0400 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2016-07-12 18:43:10 +0300 |
commit | 6059f71f1e94486a51cef90e872add11fa7b5775 (patch) | |
tree | ab2c3f7e887584e678843347030f35aab7828074 /security/apparmor/policy_unpack.c | |
parent | bd35db8b8ca6e27fc17a9057ef78e1ddfc0de351 (diff) | |
download | linux-6059f71f1e94486a51cef90e872add11fa7b5775.tar.xz |
apparmor: add parameter to control whether policy hashing is used
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Diffstat (limited to 'security/apparmor/policy_unpack.c')
-rw-r--r-- | security/apparmor/policy_unpack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index a689f10930b5..a55fb2f170c9 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c @@ -775,8 +775,9 @@ int aa_unpack(void *udata, size_t size, struct list_head *lh, const char **ns) if (error) goto fail_profile; - error = aa_calc_profile_hash(profile, e.version, start, - e.pos - start); + if (aa_g_hash_policy) + error = aa_calc_profile_hash(profile, e.version, start, + e.pos - start); if (error) goto fail_profile; |