aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@polito.it>2013-11-08 19:21:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-06 11:34:05 -0800
commitf5ceff3d8c64d07e716e3f97734037e448327a72 (patch)
tree4c01bdc9ce45be9aa5c126a7d8ab1c6a94eb4ad5
parentb6bb44f306acf3555fc1f89ec8f708e7109c6d17 (diff)
ima: change the default hash algorithm to SHA1 in ima_eventdigest_ng_init()
commit c502c78ba7fb5b9cef71e2bd70f12c38ef26e5ab upstream. Replace HASH_ALGO__LAST with HASH_ALGO_SHA1 as the initial value of the hash algorithm so that the prefix 'sha1:' is added to violation digests. Fix commit: 4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--security/integrity/ima/ima_template_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c
index c38adcc910f..1c2a6341265 100644
--- a/security/integrity/ima/ima_template_lib.c
+++ b/security/integrity/ima/ima_template_lib.c
@@ -255,7 +255,7 @@ int ima_eventdigest_ng_init(struct integrity_iint_cache *iint,
struct evm_ima_xattr_data *xattr_value,
int xattr_len, struct ima_field_data *field_data)
{
- u8 *cur_digest = NULL, hash_algo = HASH_ALGO__LAST;
+ u8 *cur_digest = NULL, hash_algo = HASH_ALGO_SHA1;
u32 cur_digestsize = 0;
/* If iint is NULL, we are recording a violation. */