summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorDmitry Kasatkin <d.kasatkin@samsung.com>2014-06-27 18:15:44 +0300
committerMimi Zohar <zohar@linux.vnet.ibm.com>2014-09-09 10:28:43 -0400
commit3034a146820c26fe6da66a45f6340fe87fe0983a (patch)
treef78b031b7d1fa7eabe1f221749157fefa04704cd /fs/nfsd/vfs.c
parent3dcbad52cf18c3c379e96b992d22815439ebbe53 (diff)
downloadop-kernel-dev-3034a146820c26fe6da66a45f6340fe87fe0983a.zip
op-kernel-dev-3034a146820c26fe6da66a45f6340fe87fe0983a.tar.gz
ima: pass 'opened' flag to identify newly created files
Empty files and missing xattrs do not guarantee that a file was just created. This patch passes FILE_CREATED flag to IMA to reliably identify new files. Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: <stable@vger.kernel.org> 3.14+
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 140c496..d49c778 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -709,7 +709,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
host_err = PTR_ERR(*filp);
*filp = NULL;
} else {
- host_err = ima_file_check(*filp, may_flags);
+ host_err = ima_file_check(*filp, may_flags, 0);
if (may_flags & NFSD_MAY_64BIT_COOKIE)
(*filp)->f_mode |= FMODE_64BITHASH;
OpenPOWER on IntegriCloud