diff options
author | Roberto Sassu <roberto.sassu@polito.it> | 2013-06-07 06:16:26 -0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2013-10-25 17:17:02 -0400 |
commit | 7d802a227b7f26c89f13dab09767e6b0aebd9c9f (patch) | |
tree | 755c29562e348bc3b3f30c5a402d00d8eea77b75 /security/integrity/ima/ima_api.c | |
parent | 09ef54359c4ad49c01a12503b2c510b424ecf059 (diff) |
ima: pass the file descriptor to ima_add_violation()
Pass the file descriptor instead of the inode to ima_add_violation(),
to make the latter consistent with ima_store_measurement() in
preparation for the new template architecture.
Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r-- | security/integrity/ima/ima_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c index bc1d1282a06f..98160a3259fe 100644 --- a/security/integrity/ima/ima_api.c +++ b/security/integrity/ima/ima_api.c | |||
@@ -78,10 +78,11 @@ int ima_store_template(struct ima_template_entry *entry, | |||
78 | * By extending the PCR with 0xFF's instead of with zeroes, the PCR | 78 | * By extending the PCR with 0xFF's instead of with zeroes, the PCR |
79 | * value is invalidated. | 79 | * value is invalidated. |
80 | */ | 80 | */ |
81 | void ima_add_violation(struct inode *inode, const unsigned char *filename, | 81 | void ima_add_violation(struct file *file, const unsigned char *filename, |
82 | const char *op, const char *cause) | 82 | const char *op, const char *cause) |
83 | { | 83 | { |
84 | struct ima_template_entry *entry; | 84 | struct ima_template_entry *entry; |
85 | struct inode *inode = file->f_dentry->d_inode; | ||
85 | int violation = 1; | 86 | int violation = 1; |
86 | int result; | 87 | int result; |
87 | 88 | ||