]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient: discard old challenge if authorizer is bad
authorSage Weil <sage@redhat.com>
Tue, 23 Apr 2019 18:52:07 +0000 (13:52 -0500)
committerSage Weil <sage@redhat.com>
Wed, 24 Apr 2019 18:46:04 +0000 (13:46 -0500)
If we are a server/accepter, and we get a bad authorizer, discard our old
challenge, since the previous exchange has failed.  This way if the client
retries, their new authorize attempt won't conflict with our old challenge.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonClient.cc

index 8df084b7df6dd89bcac5ddca53d78872fc1f624e..d01c436a235896b9ee32e0f1edfd37222ad24e02 100644 (file)
@@ -1472,6 +1472,8 @@ int MonClient::handle_auth_request(
     return 0;
   }
   ldout(cct,10) << __func__ << " bad authorizer on " << con << dendl;
+  // discard old challenge
+  auth_meta->authorizer_challenge.reset();
   return -EACCES;
 }