ima: use dynamically allocated hash storage
authorDmitry Kasatkin <d.kasatkin@samsung.com>
Thu, 25 Apr 2013 07:44:04 +0000 (10:44 +0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Fri, 25 Oct 2013 21:17:00 +0000 (17:17 -0400)
commita35c3fb6490cc1d3446e4781693408100113c4fb
tree03234f8b7ebaf3cb98bf77f999b8a5284d4dadbc
parentb1aaab22e263d0cca1effe319b7d2bf895444219
ima: use dynamically allocated hash storage

For each inode in the IMA policy, an iint is allocated.  To support
larger hash digests, the iint digest size changed from 20 bytes to
the maximum supported hash digest size.  Instead of allocating the
maximum size, which most likely is not needed, this patch dynamically
allocates the needed hash storage.

Changelog:
- fix krealloc bug

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/iint.c
security/integrity/ima/ima_api.c
security/integrity/ima/ima_appraise.c
security/integrity/integrity.h