]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
vfs: don't call ima_file_check() unconditionally in nfsd_open()
authorChuck Ebbert <cebbert@redhat.com>
Mon, 15 Feb 2010 23:07:39 +0000 (18:07 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 20 Feb 2010 05:47:31 +0000 (00:47 -0500)
commit 1e41568d7378d1ba8c64ba137b9ddd00b59f893a ("Take ima_path_check()
in nfsd past dentry_open() in nfsd_open()") moved this code back to its
original location but missed the "else".

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfsd/vfs.c

index 97d79eff6b7f65af66688d52e96ed6b6a9217ec3..8715d194561aa626bff1d18991a2ac667be00715 100644 (file)
@@ -752,7 +752,8 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
                            flags, current_cred());
        if (IS_ERR(*filp))
                host_err = PTR_ERR(*filp);
-       host_err = ima_file_check(*filp, access);
+       else
+               host_err = ima_file_check(*filp, access);
 out_nfserr:
        err = nfserrno(host_err);
 out: