summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorMi Jinlong <mijinlong@cn.fujitsu.com>2011-03-23 17:57:07 +0800
committerJ. Bruce Fields <bfields@redhat.com>2011-04-29 20:47:53 -0400
commita62573dc353b255dbbc8520bfdcb1c8a8c1ada87 (patch)
tree23c0b4cd8dfe6a0670237d946df6b5b184c25f1b /fs/nfsd/nfs4state.c
parentac6721a13e5b1a90728e790600f827a5e5f5da2f (diff)
downloadblackbird-op-linux-a62573dc353b255dbbc8520bfdcb1c8a8c1ada87.tar.gz
blackbird-op-linux-a62573dc353b255dbbc8520bfdcb1c8a8c1ada87.zip
nfsd41: add flag checking for create_session
Teach the NFS server to reject invalid create_session flags. Also do some minor formatting adjustments. Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index fbde6f79922e..6dbaa379c863 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1515,6 +1515,9 @@ nfsd4_create_session(struct svc_rqst *rqstp,
bool confirm_me = false;
int status = 0;
+ if (cr_ses->flags & ~SESSION4_FLAG_MASK_A)
+ return nfserr_inval;
+
nfs4_lock_state();
unconf = find_unconfirmed_client(&cr_ses->clientid);
conf = find_confirmed_client(&cr_ses->clientid);
OpenPOWER on IntegriCloud