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
1818 #ifdef CONFIG_IMA
1919 extern int ima_bprm_check(struct linux_binprm *bprm);
2020 extern int ima_file_check(struct file *file, int mask);
21+extern void ima_post_create_tmpfile(struct inode *inode);
2122 extern void ima_file_free(struct file *file);
2223 extern int ima_file_mmap(struct file *file, unsigned long prot);
2324 extern 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
5657 return 0;
5758 }
5859
60+static inline void ima_post_create_tmpfile(struct inode *inode)
61+{
62+}
63+
5964 static inline void ima_file_free(struct file *file)
6065 {
6166 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