Skip to content

Commit fec5f85

Browse files
robertosassupcmoore
authored andcommitted
ima: Align ima_post_read_file() definition with LSM infrastructure
Change ima_post_read_file() definition, by making "void *buf" a "char *buf", so that it can be registered as implementation of the post_read_file hook. Signed-off-by: Roberto Sassu <[email protected]> Reviewed-by: Stefan Berger <[email protected]> Reviewed-by: Mimi Zohar <[email protected]> Reviewed-by: Casey Schaufler <[email protected]> Acked-by: Mimi Zohar <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent 526864d commit fec5f85

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/linux/ima.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern int ima_post_load_data(char *buf, loff_t size,
3030
enum kernel_load_data_id id, char *description);
3131
extern int ima_read_file(struct file *file, enum kernel_read_file_id id,
3232
bool contents);
33-
extern int ima_post_read_file(struct file *file, void *buf, loff_t size,
33+
extern int ima_post_read_file(struct file *file, char *buf, loff_t size,
3434
enum kernel_read_file_id id);
3535
extern void ima_post_path_mknod(struct mnt_idmap *idmap,
3636
struct dentry *dentry);
@@ -108,7 +108,7 @@ static inline int ima_read_file(struct file *file, enum kernel_read_file_id id,
108108
return 0;
109109
}
110110

111-
static inline int ima_post_read_file(struct file *file, void *buf, loff_t size,
111+
static inline int ima_post_read_file(struct file *file, char *buf, loff_t size,
112112
enum kernel_read_file_id id)
113113
{
114114
return 0;

security/integrity/ima/ima_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ const int read_idmap[READING_MAX_ID] = {
803803
* On success return 0. On integrity appraisal error, assuming the file
804804
* is in policy and IMA-appraisal is in enforcing mode, return -EACCES.
805805
*/
806-
int ima_post_read_file(struct file *file, void *buf, loff_t size,
806+
int ima_post_read_file(struct file *file, char *buf, loff_t size,
807807
enum kernel_read_file_id read_id)
808808
{
809809
enum ima_hooks func;

0 commit comments

Comments
 (0)