linux/security/integrity/ima
Roberto Sassu 7dbdb4206b ima: display template format in meas. list if template name length is zero
With the introduction of the 'ima_template_fmt' kernel cmdline parameter,
a user can define a new template descriptor with custom format. However,
in this case, userspace tools will be unable to parse the measurements
list because the new template is unknown. For this reason, this patch
modifies the current IMA behavior to display in the list the template
format instead of the name (only if the length of the latter is zero)
so that a tool can extract needed information if it can handle listed
fields.

This patch also correctly displays the error log message in
ima_init_template() if the selected template cannot be initialized.

Changelog:
 - v3:
   - check the first byte of 'e->template_desc->name' instead of using
     strlen() in ima_fs.c (suggested by Mimi Zohar)

 - v2:
   - print the template format in ima_init_template(), if the selected
     template is custom (Roberto Sassu)

 - v1:
   - fixed patch description (Roberto Sassu, suggested by Mimi Zohar)
   - set 'template_name' variable in ima_fs.c only once
     (Roberto Sassu, suggested by Mimi Zohar)

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2014-10-13 08:39:01 -04:00
..
ima_api.c ima: use path names cache 2014-10-07 14:32:54 -04:00
ima_appraise.c ima: added ima_policy_flag variable 2014-09-17 16:39:36 -04:00
ima_crypto.c ima: add missing '__init' keywords 2014-09-09 10:28:50 -04:00
ima_fs.c ima: display template format in meas. list if template name length is zero 2014-10-13 08:39:01 -04:00
ima_init.c ima: return an error code from ima_add_boot_aggregate() 2014-09-17 16:15:42 -04:00
ima_main.c ima: use path names cache 2014-10-07 14:32:54 -04:00
ima_policy.c ima: use atomic bit operations to protect policy update interface 2014-10-11 23:33:02 -04:00
ima_queue.c integrity: fix checkpatch errors 2014-03-07 12:15:45 -05:00
ima_template_lib.c ima: reduce memory usage when a template containing the n field is used 2014-03-07 11:32:30 -05:00
ima_template_lib.h ima: extend the measurement list to include the file signature 2013-10-31 20:19:35 -04:00
ima_template.c ima: display template format in meas. list if template name length is zero 2014-10-13 08:39:01 -04:00
ima.h ima: added ima_policy_flag variable 2014-09-17 16:39:36 -04:00
Kconfig integrity: base integrity subsystem kconfig options on integrity 2014-09-09 10:28:56 -04:00
Makefile ima: define template fields library and new helpers 2013-10-25 17:17:05 -04:00