OSDN Git Service

ima: refactor ima_init_policy()
authorNayna Jain <nayna@linux.ibm.com>
Tue, 9 Oct 2018 17:30:35 +0000 (23:00 +0530)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 11 Dec 2018 12:13:39 +0000 (07:13 -0500)
commitc52657d93b0530449233979514a08cf9fe5c24bc
treea8908f484fa957cca1425c21853652da622c9cdd
parentb5ca117365d960fe5e4fe272bcc8142c28769383
ima: refactor ima_init_policy()

This patch removes the code duplication in ima_init_policy() by defining
a new function named add_rules(). The new function adds the rules to the
initial IMA policy, the custom policy or both based on the policy mask
(IMA_DEFAULT_POLICY, IMA_CUSTOM_POLICY).

Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_policy.c