Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 712a49bd authored by Roberto Sassu's avatar Roberto Sassu Committed by Mimi Zohar
Browse files

ima: pass HASH_ALGO__LAST as hash algo in ima_eventdigest_init()



Replace the '-1' value with HASH_ALGO__LAST in ima_eventdigest_init()
as the called function ima_eventdigest_init_common() expects an unsigned
char.

Fix commit:
  4d7aeee7 ima: define new template ima-ng and template fields d-ng and n-ng

Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
parent c502c78b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -239,8 +239,8 @@ int ima_eventdigest_init(struct integrity_iint_cache *iint, struct file *file,
	cur_digest = hash.hdr.digest;
	cur_digestsize = hash.hdr.length;
out:
	return ima_eventdigest_init_common(cur_digest, cur_digestsize, -1,
					   field_data, true);
	return ima_eventdigest_init_common(cur_digest, cur_digestsize,
					   HASH_ALGO__LAST, field_data, true);
}

/*