aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-12-16 06:27:40 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-16 12:16:47 -0500
commitb65a9cfc2c38eebc33533280b8ad5841caee8b6e (patch)
treed6e5b713615cc5e65c900162ab09235ae4847909 /fs/open.c
parent0552f879d45cecc35d8e372a591fc5ed863bca58 (diff)
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>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index d95651e8be9e..ca69241796bd 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -30,6 +30,7 @@
30#include <linux/audit.h> 30#include <linux/audit.h>
31#include <linux/falloc.h> 31#include <linux/falloc.h>
32#include <linux/fs_struct.h> 32#include <linux/fs_struct.h>
33#include <linux/ima.h>
33 34
34#include "internal.h" 35#include "internal.h"
35 36
@@ -857,6 +858,7 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
857 if (error) 858 if (error)
858 goto cleanup_all; 859 goto cleanup_all;
859 } 860 }
861 ima_counts_get(f);
860 862
861 f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); 863 f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
862 864