summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2014-12-05 21:52:49 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-03-12 11:53:32 -0400
commit09a330f4b9324e40947cc4fff13606719382c580 (patch)
treec38c506e9678e89bc229e17146b1fd873ce15ea9 /fs/nfs/super.c
parentdf137bc125b6155e54e6725faf0462b791a34c31 (diff)
downloadop-kernel-dev-09a330f4b9324e40947cc4fff13606719382c580.zip
op-kernel-dev-09a330f4b9324e40947cc4fff13606719382c580.tar.gz
NFS: remount with security change should return EINVAL
A remount that alters security flavors can appear to succeed when it should instead return -EINVAL. Check to see if the current security flavor exists within the flavors specified in the remount options, and if not fail the remount. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 322b2de02..54a079a 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2193,7 +2193,7 @@ nfs_compare_remount_data(struct nfs_server *nfss,
data->version != nfss->nfs_client->rpc_ops->version ||
data->minorversion != nfss->nfs_client->cl_minorversion ||
data->retrans != nfss->client->cl_timeout->to_retries ||
- data->selected_flavor != nfss->client->cl_auth->au_flavor ||
+ !nfs_auth_info_match(&data->auth_info, nfss->client->cl_auth->au_flavor) ||
data->acregmin != nfss->acregmin / HZ ||
data->acregmax != nfss->acregmax / HZ ||
data->acdirmin != nfss->acdirmin / HZ ||
@@ -2241,7 +2241,6 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
data->wsize = nfss->wsize;
data->retrans = nfss->client->cl_timeout->to_retries;
data->selected_flavor = nfss->client->cl_auth->au_flavor;
- data->auth_info = nfss->auth_info;
data->acregmin = nfss->acregmin / HZ;
data->acregmax = nfss->acregmax / HZ;
data->acdirmin = nfss->acdirmin / HZ;
OpenPOWER on IntegriCloud