Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3121
b: refs/heads/master
c: 7c79f73
h: refs/heads/master
i:
  3119: dd49f4c
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jun 24, 2005
1 parent 1394fc9 commit b3336c2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08e8987c37cd04d2df211c1e019d8f165d44266e
refs/heads/master: 7c79f7377cd4f2a50d51475f4c7966a3e60596a7
59 changes: 29 additions & 30 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,16 +869,16 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
}
unconf = clp;
}
/* CASE 1:
* unconf record that matches input clientid and input confirm.
* conf record that matches input clientid.
* conf and unconf records match names, verifiers
*/
if ((conf && unconf) &&
(cmp_verf(&unconf->cl_confirm, &confirm)) &&
(cmp_verf(&conf->cl_verifier, &unconf->cl_verifier)) &&
(same_name(conf->cl_recdir,unconf->cl_recdir)) &&
(!cmp_verf(&conf->cl_confirm, &unconf->cl_confirm))) {
/* CASE 1:
* unconf record that matches input clientid and input confirm.
* conf record that matches input clientid.
* conf and unconf records match names, verifiers
*/
if (!cmp_creds(&conf->cl_cred, &unconf->cl_cred))
status = nfserr_clid_inuse;
else {
Expand All @@ -891,29 +891,29 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
status = nfs_ok;

}
}
/* CASE 2:
* conf record that matches input clientid.
* if unconf record that matches input clientid, then unconf->cl_name
* or unconf->cl_verifier don't match the conf record.
*/
else if ((conf && !unconf) ||
} else if ((conf && !unconf) ||
((conf && unconf) &&
(!cmp_verf(&conf->cl_verifier, &unconf->cl_verifier) ||
!same_name(conf->cl_recdir, unconf->cl_recdir)))) {
/* CASE 2:
* conf record that matches input clientid.
* if unconf record matches input clientid, then
* unconf->cl_name or unconf->cl_verifier don't match the
* conf record.
*/
if (!cmp_creds(&conf->cl_cred,&rqstp->rq_cred)) {
status = nfserr_clid_inuse;
} else {
clp = conf;
status = nfs_ok;
}
}
/* CASE 3:
* conf record not found.
* unconf record found.
* unconf->cl_confirm matches input confirm
*/
else if (!conf && unconf && cmp_verf(&unconf->cl_confirm, &confirm)) {
} else if (!conf && unconf
&& cmp_verf(&unconf->cl_confirm, &confirm)) {
/* CASE 3:
* conf record not found.
* unconf record found.
* unconf->cl_confirm matches input confirm
*/
if (!cmp_creds(&unconf->cl_cred, &rqstp->rq_cred)) {
status = nfserr_clid_inuse;
} else {
Expand All @@ -928,18 +928,17 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi
move_to_confirmed(unconf);
status = nfs_ok;
}
}
/* CASE 4:
* conf record not found, or if conf, then conf->cl_confirm does not
* match input confirm.
* unconf record not found, or if unconf, then unconf->cl_confirm
* does not match input confirm.
*/
else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm))) &&
(!unconf || (unconf && !cmp_verf(&unconf->cl_confirm, &confirm)))) {
} else if ((!conf || (conf && !cmp_verf(&conf->cl_confirm, &confirm)))
&& (!unconf || (unconf && !cmp_verf(&unconf->cl_confirm,
&confirm)))) {
/* CASE 4:
* conf record not found, or if conf, conf->cl_confirm does not
* match input confirm.
* unconf record not found, or if unconf, unconf->cl_confirm
* does not match input confirm.
*/
status = nfserr_stale_clientid;
}
else {
} else {
/* check that we have hit one of the cases...*/
status = nfserr_clid_inuse;
}
Expand Down

0 comments on commit b3336c2

Please sign in to comment.