aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
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
parentdf137bc125b6155e54e6725faf0462b791a34c31 (diff)
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')
-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 322b2de02988..54a079a465e1 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2193,7 +2193,7 @@ nfs_compare_remount_data(struct nfs_server *nfss,
2193 data->version != nfss->nfs_client->rpc_ops->version || 2193 data->version != nfss->nfs_client->rpc_ops->version ||
2194 data->minorversion != nfss->nfs_client->cl_minorversion || 2194 data->minorversion != nfss->nfs_client->cl_minorversion ||
2195 data->retrans != nfss->client->cl_timeout->to_retries || 2195 data->retrans != nfss->client->cl_timeout->to_retries ||
2196 data->selected_flavor != nfss->client->cl_auth->au_flavor || 2196 !nfs_auth_info_match(&data->auth_info, nfss->client->cl_auth->au_flavor) ||
2197 data->acregmin != nfss->acregmin / HZ || 2197 data->acregmin != nfss->acregmin / HZ ||
2198 data->acregmax != nfss->acregmax / HZ || 2198 data->acregmax != nfss->acregmax / HZ ||
2199 data->acdirmin != nfss->acdirmin / HZ || 2199 data->acdirmin != nfss->acdirmin / HZ ||
@@ -2241,7 +2241,6 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
2241 data->wsize = nfss->wsize; 2241 data->wsize = nfss->wsize;
2242 data->retrans = nfss->client->cl_timeout->to_retries; 2242 data->retrans = nfss->client->cl_timeout->to_retries;
2243 data->selected_flavor = nfss->client->cl_auth->au_flavor; 2243 data->selected_flavor = nfss->client->cl_auth->au_flavor;
2244 data->auth_info = nfss->auth_info;
2245 data->acregmin = nfss->acregmin / HZ; 2244 data->acregmin = nfss->acregmin / HZ;
2246 data->acregmax = nfss->acregmax / HZ; 2245 data->acregmax = nfss->acregmax / HZ;
2247 data->acdirmin = nfss->acdirmin / HZ; 2246 data->acdirmin = nfss->acdirmin / HZ;