diff options
Diffstat (limited to 'security/integrity/ima/ima_main.c')
-rw-r--r-- | security/integrity/ima/ima_main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 26b46ff74663..1eff5cb001e5 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mount.h> | 22 | #include <linux/mount.h> |
23 | #include <linux/mman.h> | 23 | #include <linux/mman.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/ima.h> | ||
25 | 26 | ||
26 | #include "ima.h" | 27 | #include "ima.h" |
27 | 28 | ||
@@ -82,7 +83,7 @@ out: | |||
82 | "open_writers"); | 83 | "open_writers"); |
83 | } | 84 | } |
84 | 85 | ||
85 | static void ima_check_last_writer(struct ima_iint_cache *iint, | 86 | static void ima_check_last_writer(struct integrity_iint_cache *iint, |
86 | struct inode *inode, | 87 | struct inode *inode, |
87 | struct file *file) | 88 | struct file *file) |
88 | { | 89 | { |
@@ -105,12 +106,12 @@ static void ima_check_last_writer(struct ima_iint_cache *iint, | |||
105 | void ima_file_free(struct file *file) | 106 | void ima_file_free(struct file *file) |
106 | { | 107 | { |
107 | struct inode *inode = file->f_dentry->d_inode; | 108 | struct inode *inode = file->f_dentry->d_inode; |
108 | struct ima_iint_cache *iint; | 109 | struct integrity_iint_cache *iint; |
109 | 110 | ||
110 | if (!iint_initialized || !S_ISREG(inode->i_mode)) | 111 | if (!iint_initialized || !S_ISREG(inode->i_mode)) |
111 | return; | 112 | return; |
112 | 113 | ||
113 | iint = ima_iint_find(inode); | 114 | iint = integrity_iint_find(inode); |
114 | if (!iint) | 115 | if (!iint) |
115 | return; | 116 | return; |
116 | 117 | ||
@@ -121,7 +122,7 @@ static int process_measurement(struct file *file, const unsigned char *filename, | |||
121 | int mask, int function) | 122 | int mask, int function) |
122 | { | 123 | { |
123 | struct inode *inode = file->f_dentry->d_inode; | 124 | struct inode *inode = file->f_dentry->d_inode; |
124 | struct ima_iint_cache *iint; | 125 | struct integrity_iint_cache *iint; |
125 | int rc = 0; | 126 | int rc = 0; |
126 | 127 | ||
127 | if (!ima_initialized || !S_ISREG(inode->i_mode)) | 128 | if (!ima_initialized || !S_ISREG(inode->i_mode)) |
@@ -131,9 +132,9 @@ static int process_measurement(struct file *file, const unsigned char *filename, | |||
131 | if (rc != 0) | 132 | if (rc != 0) |
132 | return rc; | 133 | return rc; |
133 | retry: | 134 | retry: |
134 | iint = ima_iint_find(inode); | 135 | iint = integrity_iint_find(inode); |
135 | if (!iint) { | 136 | if (!iint) { |
136 | rc = ima_inode_alloc(inode); | 137 | rc = integrity_inode_alloc(inode); |
137 | if (!rc || rc == -EEXIST) | 138 | if (!rc || rc == -EEXIST) |
138 | goto retry; | 139 | goto retry; |
139 | return rc; | 140 | return rc; |