Untangling ima mess, part 2: deal with counters
* do ima_get_count() in __dentry_open() * stop doing that in followups * move ima_path_check() to right after nameidata_to_filp() * don't bump counters on it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <linux/audit.h>
|
||||
#include <linux/falloc.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/ima.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
@@ -857,6 +858,7 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
|
||||
if (error)
|
||||
goto cleanup_all;
|
||||
}
|
||||
ima_counts_get(f);
|
||||
|
||||
f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
|
||||
|
||||
|
Reference in New Issue
Block a user