diff options
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r-- | security/integrity/ima/ima_api.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c index d9cd5ce14d2b..86885979918c 100644 --- a/security/integrity/ima/ima_api.c +++ b/security/integrity/ima/ima_api.c | |||
@@ -179,11 +179,6 @@ int ima_get_action(struct inode *inode, int mask, int function) | |||
179 | return ima_match_policy(inode, function, mask, flags); | 179 | return ima_match_policy(inode, function, mask, flags); |
180 | } | 180 | } |
181 | 181 | ||
182 | int ima_must_measure(struct inode *inode, int mask, int function) | ||
183 | { | ||
184 | return ima_match_policy(inode, function, mask, IMA_MEASURE); | ||
185 | } | ||
186 | |||
187 | /* | 182 | /* |
188 | * ima_collect_measurement - collect file measurement | 183 | * ima_collect_measurement - collect file measurement |
189 | * | 184 | * |
@@ -330,10 +325,9 @@ const char *ima_d_path(struct path *path, char **pathbuf) | |||
330 | { | 325 | { |
331 | char *pathname = NULL; | 326 | char *pathname = NULL; |
332 | 327 | ||
333 | /* We will allow 11 spaces for ' (deleted)' to be appended */ | 328 | *pathbuf = kmalloc(PATH_MAX, GFP_KERNEL); |
334 | *pathbuf = kmalloc(PATH_MAX + 11, GFP_KERNEL); | ||
335 | if (*pathbuf) { | 329 | if (*pathbuf) { |
336 | pathname = d_path(path, *pathbuf, PATH_MAX + 11); | 330 | pathname = d_absolute_path(path, *pathbuf, PATH_MAX); |
337 | if (IS_ERR(pathname)) { | 331 | if (IS_ERR(pathname)) { |
338 | kfree(*pathbuf); | 332 | kfree(*pathbuf); |
339 | *pathbuf = NULL; | 333 | *pathbuf = NULL; |