Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a308118 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

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: default avatarJ. Bruce Fields <bfields@redhat.com>
parent ea236d07
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1553,9 +1553,11 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
	conf = find_confirmed_client_by_str(dname, strhashval);
	if (conf) {
		if (!clp_used_exchangeid(conf)) {
			status = nfserr_clid_inuse; /* XXX: ? */
			if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
				status = nfserr_inval; /* buggy client */
				goto out;
			}
		}
		if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {
			/* 18.35.4 case 9 */
			if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A)
@@ -1574,6 +1576,10 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
			expire_client(conf);
			goto out_new;
		}
		if (!clp_used_exchangeid(conf)) {
			status = nfserr_inval;
			goto out;
		}
		/*
		 * Set bit when the owner id and verifier map to an already
		 * confirmed client id (18.35.3).