Skip to contentSkip to conversation

security: ima: new helper: file_inode(file)

PATCH In review Libo Chen 2 participants 2 messages Dec 11, 2013

Subsystems (3)
lore
Share & tools
lore

Libo Chen

author
#0 lore raw

PATCH 1/1 security: ima: new helper: file_inode(file)

---
 security/integrity/ima/ima_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_api.c +1 -1
index c38bbce..6d76d4a 100644
@@ -132,7 +132,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename,
 		       const char *op, const char *cause)
 {
 	struct ima_template_entry *entry;
-	struct inode *inode = file->f_dentry->d_inode;
+	struct inode *inode = file_inode(file);
 	int violation = 1;
 	int result;
 
Signature · 1 line
1.8.2.2
#1 lore raw
Quoted 1 line · Libo Chen

Thanks!

Mimi

Quoted 17 lines
---
 security/integrity/ima/ima_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/integrity/ima/ima_api.c +1 -1
index c38bbce..6d76d4a 100644
@@ -132,7 +132,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename,
 		       const char *op, const char *cause)
 {
 	struct ima_template_entry *entry;
-	struct inode *inode = file->f_dentry->d_inode;
+	struct inode *inode = file_inode(file);
 	int violation = 1;
 	int result;