ima: use ima_parse_buf() to parse template data
authorRoberto Sassu <roberto.sassu@huawei.com>
Tue, 16 May 2017 12:53:43 +0000 (14:53 +0200)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 21 Jun 2017 18:37:12 +0000 (14:37 -0400)
commit28a8dc41279de2a8a635df51ad33d3cee7e0c0d1
treecdc197ece2071f65dce35f79a139baee400e348d
parent47fdee60b47fc2836b256761ab60ada26788b323
ima: use ima_parse_buf() to parse template data

The binary_field_data structure definition has been removed from
ima_restore_template_data(). The lengths and data pointers are directly
stored into the template_data array of the ima_template_entry structure.
For template data, both the number of fields and buffer end checks can
be done, as these information are known (respectively from the template
descriptor, and from the measurement header field).

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