Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309846
b: refs/heads/master
c: 83e08fd
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Jun 1, 2012
1 parent e22cbe5 commit f2d73e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 1a308118c238c5aa0af3d303b42fa6bbee279394
refs/heads/master: 83e08fd46cea3b59dce9285461e3854b594042af
16 changes: 10 additions & 6 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
char addr_str[INET6_ADDRSTRLEN];
nfs4_verifier verf = exid->verifier;
struct sockaddr *sa = svc_addr(rqstp);
bool update = exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A;

rpc_ntop(sa, addr_str, sizeof(addr_str));
dprintk("%s rqstp=%p exid=%p clname.len=%u clname.data=%p "
Expand Down Expand Up @@ -1552,23 +1553,26 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
nfs4_lock_state();
conf = find_confirmed_client_by_str(dname, strhashval);
if (conf) {
bool creds_match = same_creds(&conf->cl_cred, &rqstp->rq_cred);
bool verfs_match = same_verf(&verf, &conf->cl_verifier);

if (!clp_used_exchangeid(conf)) {
if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
if (update) {
status = nfserr_inval; /* buggy client */
goto out;
}
}
if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {
if (!creds_match) {
/* 18.35.4 case 9 */
if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A)
if (update)
status = nfserr_perm;
else /* case 3 */
status = nfserr_clid_inuse;
goto out;
}
if (!same_verf(&verf, &conf->cl_verifier)) {
if (!verfs_match) {
/* 18.35.4 case 8 */
if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
if (update) {
status = nfserr_not_same;
goto out;
}
Expand All @@ -1595,7 +1599,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
}

/* 18.35.4 case 7 */
if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
if (update) {
status = nfserr_noent;
goto out;
}
Expand Down

0 comments on commit f2d73e2

Please sign in to comment.