aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-05-12 21:32:30 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-05-31 20:29:52 -0400
commit1a308118c238c5aa0af3d303b42fa6bbee279394 (patch)
tree96998e1b4bfe4577846102d83df17f2482d3fc99 /fs/nfsd
parentea236d0704b9b9e7742b107313bbdddbba62724a (diff)
nfsd4: allow an EXCHANGE_ID to kill a 4.0 client
Following rfc 5661 section 2.4.1, we can permit a 4.1 client to remove an established 4.0 client's state. (But we don't allow updates.) Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index f372a6edef34..c88f5c103e87 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1553,8 +1553,10 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
1553 conf = find_confirmed_client_by_str(dname, strhashval); 1553 conf = find_confirmed_client_by_str(dname, strhashval);
1554 if (conf) { 1554 if (conf) {
1555 if (!clp_used_exchangeid(conf)) { 1555 if (!clp_used_exchangeid(conf)) {
1556 status = nfserr_clid_inuse; /* XXX: ? */ 1556 if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
1557 goto out; 1557 status = nfserr_inval; /* buggy client */
1558 goto out;
1559 }
1558 } 1560 }
1559 if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) { 1561 if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {
1560 /* 18.35.4 case 9 */ 1562 /* 18.35.4 case 9 */
@@ -1574,6 +1576,10 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
1574 expire_client(conf); 1576 expire_client(conf);
1575 goto out_new; 1577 goto out_new;
1576 } 1578 }
1579 if (!clp_used_exchangeid(conf)) {
1580 status = nfserr_inval;
1581 goto out;
1582 }
1577 /* 1583 /*
1578 * Set bit when the owner id and verifier map to an already 1584 * Set bit when the owner id and verifier map to an already
1579 * confirmed client id (18.35.3). 1585 * confirmed client id (18.35.3).