]> git.baikalelectronics.ru Git - kernel.git/commit
ima: define new function ima_alloc_init_template() to API
authorRoberto Sassu <roberto.sassu@polito.it>
Fri, 7 Jun 2013 10:16:28 +0000 (12:16 +0200)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Fri, 25 Oct 2013 21:17:04 +0000 (17:17 -0400)
commit25c91b5b76f6b7134e544038fa9fbe6b60e8c100
treeb15aaf6f56d81d204296455a80fd1ff29c4cd122
parentdb46610e0581c1aa4efc8f15b2a7270b845b9796
ima: define new function ima_alloc_init_template() to API

Instead of allocating and initializing the template entry from multiple
places (eg. boot aggregate, violation, and regular measurements), this
patch defines a new function called ima_alloc_init_template().  The new
function allocates and initializes the measurement entry with the inode
digest and the filename.

In respect to the current behavior, it truncates the file name passed
in the 'filename' argument if the latter's size is greater than 255 bytes
and the passed file descriptor is NULL.

Changelog:
- initialize 'hash' variable for non TPM case - Mimi
- conform to expectation for 'iint' to be defined as a pointer. - Mimi
- add missing 'file' dependency for recalculating file hash. - Mimi

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