ima: extend ima_get_action() to return the policy pcr

Different policy rules may extend different PCRs. This patch retrieves
the specific PCR for the matched rule.  Subsequent patches will include
the rule specific PCR in the measurement list and extend the appropriate
PCR.

Signed-off-by: Eric Richter <erichte@linux.vnet.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
This commit is contained in:
Eric Richter
2016-06-01 13:14:02 -05:00
committed by Mimi Zohar
parent 0260643ce8
commit 725de7fabb
5 changed files with 14 additions and 7 deletions

View File

@@ -154,7 +154,8 @@ enum ima_hooks {
};
/* LIM API function definitions */
int ima_get_action(struct inode *inode, int mask, enum ima_hooks func);
int ima_get_action(struct inode *inode, int mask,
enum ima_hooks func, int *pcr);
int ima_must_measure(struct inode *inode, int mask, enum ima_hooks func);
int ima_collect_measurement(struct integrity_iint_cache *iint,
struct file *file, void *buf, loff_t size,
@@ -174,7 +175,7 @@ const char *ima_d_path(const struct path *path, char **pathbuf);
/* IMA policy related functions */
int ima_match_policy(struct inode *inode, enum ima_hooks func, int mask,
int flags);
int flags, int *pcr);
void ima_init_policy(void);
void ima_update_policy(void);
void ima_update_policy_flag(void);