Created
April 18, 2017 04:20
-
-
Save Stebalien/4bd429815f5695284ab69da826fcb404 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/security/apparmor/policy_unpack.c 2017-04-17 21:12:26.765200867 -0700 | |
+++ b/security/apparmor/policy_unpack.c 2017-04-17 21:11:48.449086006 -0700 | |
@@ -941,9 +941,11 @@ | |
if (error) | |
goto fail_profile; | |
+#ifdef CONFIG_SECURITY_APPARMOR_HASH | |
if (aa_g_hash_policy) | |
error = aa_calc_profile_hash(profile, e.version, start, | |
e.pos - start); | |
+#endif | |
if (error) | |
goto fail_profile; | |
@@ -958,6 +960,7 @@ | |
list_add_tail(&ent->list, lh); | |
} | |
udata->abi = e.version & K_ABI_MASK; | |
+#ifdef CONFIG_SECURITY_APPARMOR_HASH | |
if (aa_g_hash_policy) { | |
udata->hash = aa_calc_hash(udata->data, udata->size); | |
if (IS_ERR(udata->hash)) { | |
@@ -966,6 +969,7 @@ | |
goto fail; | |
} | |
} | |
+#endif | |
return 0; | |
fail_profile: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment