Commit 49ed2267 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: nfsd4 setclientid fix

Fix a somewhat bizarre corner case in clid processing: a clientid match isn't
required for case 3.

From: Andy Adamson <andros@citi.umich.edu>
From: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e6ad7fd1
...@@ -495,15 +495,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) ...@@ -495,15 +495,13 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid)
gen_clid(new); gen_clid(new);
gen_confirm(new); gen_confirm(new);
add_to_unconfirmed(new, strhashval); add_to_unconfirmed(new, strhashval);
} else if (!cmp_clid(&conf->cl_clientid, &unconf->cl_clientid) && } else if (!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm)) {
!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm)) {
/* /*
* CASE3: * CASE3:
* confirmed found (name, principal match) * confirmed found (name, principal match)
* confirmed verifier does not match input clverifier * confirmed verifier does not match input clverifier
* *
* unconfirmed found (name match) * unconfirmed found (name match)
* confirmed->cl_clientid != unconfirmed->cl_clientid and
* confirmed->cl_confirm != unconfirmed->cl_confirm * confirmed->cl_confirm != unconfirmed->cl_confirm
* *
* remove unconfirmed. * remove unconfirmed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment