ima: define new template ima-ng and template fields d-ng and n-ng
authorRoberto Sassu <roberto.sassu@polito.it>
Fri, 7 Jun 2013 10:16:32 +0000 (12:16 +0200)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Fri, 25 Oct 2013 21:17:05 +0000 (17:17 -0400)
commit4d7aeee73f5304bf195aa2904f8eb1d7b2e8fe52
tree5cc0bb30f81dab7a981c1f640fb668932a7c32c2
parent3ce1217d6cd5dfa82a9db5c2a999cc1bb01490d9
ima: define new template ima-ng and template fields d-ng and n-ng

This patch adds support for the new template 'ima-ng', whose format
is defined as 'd-ng|n-ng'.  These new field definitions remove the
size limitations of the original 'ima' template.  Further, the 'd-ng'
field prefixes the inode digest with the hash algorithim, when
displaying the new larger digest sizes.

Change log:
- scripts/Lindent fixes  - Mimi
- "always true comparison" - reported by Fengguang Wu, resolved Dmitry
- initialize hash_algo variable to HASH_ALGO__LAST
- always prefix digest with hash algorithm - Mimi

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_template.c
security/integrity/ima/ima_template_lib.c
security/integrity/ima/ima_template_lib.h