]> git.baikalelectronics.ru Git - kernel.git/commit
ima: initialize the "template" field with the default template
authorMimi Zohar <zohar@linux.ibm.com>
Fri, 19 Jul 2019 11:16:57 +0000 (07:16 -0400)
committerMimi Zohar <zohar@linux.ibm.com>
Thu, 1 Aug 2019 12:25:36 +0000 (08:25 -0400)
commit2d3fc35eedd8985d3300bc9d9fa6defa66366d05
treeb37cf1cf1e64719559682a96c4e8ae6aa43dcb53
parent41a187cd24925e8550afd67e1bda36b35bf2bd6a
ima: initialize the "template" field with the default template

IMA policy rules are walked sequentially.  Depending on the ordering of
the policy rules, the "template" field might be defined in one rule, but
will be replaced by subsequent, applicable rules, even if the rule does
not explicitly define the "template" field.

This patch initializes the "template" once and only replaces the
"template", when explicitly defined.

Fixes: ff55e74a13c7 ("IMA: support for per policy rule template formats")
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_policy.c