aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2015-09-01 13:40:53 -0400
committerJ. Bruce Fields <bfields@redhat.com>2015-09-01 13:53:40 -0400
commitf984a7ce58ea9a12eca7f960bdf68124c8589b60 (patch)
tree23f161f7d054798bcb1b1d614cefdbae71997979 /fs/nfsd
parent3fcbbd244ed1d20dc0eb7d48d729503992fa9b7d (diff)
nfsd: return CLID_INUSE for unexpected SETCLIENTID_CONFIRM case
Somebody with a Solaris client was hitting this case. We haven't figured out why yet, and don't have a reproducer. Meanwhile Frank noticed that RFC 7530 actually recommends CLID_INUSE for this case. Unlikely to help the original reporter, but may as well fix it. Reported-by: Frank Filz <ffilzlnx@mindspring.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 416f32e34a33..08746ec1d44a 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3111,10 +3111,11 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
3111 /* 3111 /*
3112 * We try hard to give out unique clientid's, so if we get an 3112 * We try hard to give out unique clientid's, so if we get an
3113 * attempt to confirm the same clientid with a different cred, 3113 * attempt to confirm the same clientid with a different cred,
3114 * there's a bug somewhere. Let's charitably assume it's our 3114 * the client may be buggy; this should never happen.
3115 * bug. 3115 *
3116 * Nevertheless, RFC 7530 recommends INUSE for this case:
3116 */ 3117 */
3117 status = nfserr_serverfault; 3118 status = nfserr_clid_inuse;
3118 if (unconf && !same_creds(&unconf->cl_cred, &rqstp->rq_cred)) 3119 if (unconf && !same_creds(&unconf->cl_cred, &rqstp->rq_cred))
3119 goto out; 3120 goto out;
3120 if (conf && !same_creds(&conf->cl_cred, &rqstp->rq_cred)) 3121 if (conf && !same_creds(&conf->cl_cred, &rqstp->rq_cred))