History

ima: define ima_post_create_tmpfile() hook and add missing call

If tmpfiles can be made persistent, then newly created tmpfiles need to be treated like any other new files in policy. This patch indicates which newly created tmpfiles are in policy, causing the file hash to be calculated on __fput().

Mimi Zohar committed 7 years ago

Commit fdb24101 parent c8b37523 files · +39 −2Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/ima.h+5−0
@@ -18,6 +18,7 @@ struct linux_binprm; · 17 unmodified lines
18#ifdef CONFIG_IMA18#ifdef CONFIG_IMA
19extern int ima_bprm_check(struct linux_binprm *bprm);19extern int ima_bprm_check(struct linux_binprm *bprm);
20extern int ima_file_check(struct file *file, int mask);20extern int ima_file_check(struct file *file, int mask);
21extern void ima_post_create_tmpfile(struct inode *inode);
21extern void ima_file_free(struct file *file);22extern void ima_file_free(struct file *file);
22extern int ima_file_mmap(struct file *file, unsigned long prot);23extern int ima_file_mmap(struct file *file, unsigned long prot);
23extern int ima_load_data(enum kernel_load_data_id id);24extern int ima_load_data(enum kernel_load_data_id id);
@@ -56,6 +57,10 @@ static inline int ima_file_check(struct file *file, int mask) · 32 unmodified lines
56 return 0;57 return 0;
57}58}
58 59
60static inline void ima_post_create_tmpfile(struct inode *inode)
61{
62}
63
59static inline void ima_file_free(struct file *file)64static inline void ima_file_free(struct file *file)
60{65{
61 return;66 return;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t