diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/export.c | 10 | ||||
-rw-r--r-- | fs/nfsd/vfs.c | 2 |
2 files changed, 2 insertions, 10 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index c487810a2366..a0c4016413f1 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1316,19 +1316,11 @@ rqst_exp_parent(struct svc_rqst *rqstp, struct path *path) | |||
1316 | 1316 | ||
1317 | static struct svc_export *find_fsidzero_export(struct svc_rqst *rqstp) | 1317 | static struct svc_export *find_fsidzero_export(struct svc_rqst *rqstp) |
1318 | { | 1318 | { |
1319 | struct svc_export *exp; | ||
1320 | u32 fsidv[2]; | 1319 | u32 fsidv[2]; |
1321 | 1320 | ||
1322 | mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL); | 1321 | mk_fsid(FSID_NUM, fsidv, 0, 0, 0, NULL); |
1323 | 1322 | ||
1324 | exp = rqst_exp_find(rqstp, FSID_NUM, fsidv); | 1323 | return rqst_exp_find(rqstp, FSID_NUM, fsidv); |
1325 | /* | ||
1326 | * We shouldn't have accepting an nfsv4 request at all if we | ||
1327 | * don't have a pseudoexport!: | ||
1328 | */ | ||
1329 | if (IS_ERR(exp) && PTR_ERR(exp) == -ENOENT) | ||
1330 | exp = ERR_PTR(-ESERVERFAULT); | ||
1331 | return exp; | ||
1332 | } | 1324 | } |
1333 | 1325 | ||
1334 | /* | 1326 | /* |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index c194793b642b..97d79eff6b7f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -752,6 +752,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
752 | flags, current_cred()); | 752 | flags, current_cred()); |
753 | if (IS_ERR(*filp)) | 753 | if (IS_ERR(*filp)) |
754 | host_err = PTR_ERR(*filp); | 754 | host_err = PTR_ERR(*filp); |
755 | host_err = ima_file_check(*filp, access); | ||
755 | out_nfserr: | 756 | out_nfserr: |
756 | err = nfserrno(host_err); | 757 | err = nfserrno(host_err); |
757 | out: | 758 | out: |
@@ -2127,7 +2128,6 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, | |||
2127 | */ | 2128 | */ |
2128 | path.mnt = exp->ex_path.mnt; | 2129 | path.mnt = exp->ex_path.mnt; |
2129 | path.dentry = dentry; | 2130 | path.dentry = dentry; |
2130 | err = ima_path_check(&path, acc & (MAY_READ | MAY_WRITE | MAY_EXEC)); | ||
2131 | nfsd_out: | 2131 | nfsd_out: |
2132 | return err? nfserrno(err) : 0; | 2132 | return err? nfserrno(err) : 0; |
2133 | } | 2133 | } |