mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
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 <roberto.sassu@huawei.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Acked-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
526864dd2f
commit
fec5f85e46
@ -30,7 +30,7 @@ extern int ima_post_load_data(char *buf, loff_t size,
|
|||||||
enum kernel_load_data_id id, char *description);
|
enum kernel_load_data_id id, char *description);
|
||||||
extern int ima_read_file(struct file *file, enum kernel_read_file_id id,
|
extern int ima_read_file(struct file *file, enum kernel_read_file_id id,
|
||||||
bool contents);
|
bool contents);
|
||||||
extern int ima_post_read_file(struct file *file, void *buf, loff_t size,
|
extern int ima_post_read_file(struct file *file, char *buf, loff_t size,
|
||||||
enum kernel_read_file_id id);
|
enum kernel_read_file_id id);
|
||||||
extern void ima_post_path_mknod(struct mnt_idmap *idmap,
|
extern void ima_post_path_mknod(struct mnt_idmap *idmap,
|
||||||
struct dentry *dentry);
|
struct dentry *dentry);
|
||||||
@ -108,7 +108,7 @@ static inline int ima_read_file(struct file *file, enum kernel_read_file_id id,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ima_post_read_file(struct file *file, void *buf, loff_t size,
|
static inline int ima_post_read_file(struct file *file, char *buf, loff_t size,
|
||||||
enum kernel_read_file_id id)
|
enum kernel_read_file_id id)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -803,7 +803,7 @@ const int read_idmap[READING_MAX_ID] = {
|
|||||||
* On success return 0. On integrity appraisal error, assuming the file
|
* On success return 0. On integrity appraisal error, assuming the file
|
||||||
* is in policy and IMA-appraisal is in enforcing mode, return -EACCES.
|
* is in policy and IMA-appraisal is in enforcing mode, return -EACCES.
|
||||||
*/
|
*/
|
||||||
int ima_post_read_file(struct file *file, void *buf, loff_t size,
|
int ima_post_read_file(struct file *file, char *buf, loff_t size,
|
||||||
enum kernel_read_file_id read_id)
|
enum kernel_read_file_id read_id)
|
||||||
{
|
{
|
||||||
enum ima_hooks func;
|
enum ima_hooks func;
|
||||||
|
Loading…
Reference in New Issue
Block a user