]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: fix service side bug on bad authorizer
authorSage Weil <sage@newdream.net>
Thu, 29 Oct 2009 22:33:08 +0000 (15:33 -0700)
committerSage Weil <sage@newdream.net>
Thu, 29 Oct 2009 22:36:27 +0000 (15:36 -0700)
src/auth/cephx/CephxProtocol.h
src/auth/cephx/CephxServiceHandler.cc

index ae1ed1e0a50c511d7547f4eb0f6055ec4be9c164..28d419a799403b57efcb9bb189ecc8539e678135 100644 (file)
@@ -319,12 +319,12 @@ struct CephXServiceTicketInfo {
 WRITE_CLASS_ENCODER(CephXServiceTicketInfo);
 
 struct CephXAuthorize {
-  utime_t now;
+  __u64 nonce;
   void encode(bufferlist& bl) const {
-    ::encode(now, bl);
+    ::encode(nonce, bl);
   }
   void decode(bufferlist::iterator& bl) {
-    ::decode(now, bl);
+    ::decode(nonce, bl);
   }
 };
 WRITE_CLASS_ENCODER(CephXAuthorize);
index 1a5d2b064464b08c00c710b89878a7af38d7fc80..a3384754f7f26c4a88e2bc78418c62c4f1d6dd7c 100644 (file)
@@ -128,6 +128,7 @@ int CephxServiceHandler::handle_request(bufferlist::iterator& indata, bufferlist
       CephXServiceTicketInfo auth_ticket_info;
       if (!cephx_verify_authorizer(*key_server, indata, auth_ticket_info, tmp_bl)) {
         ret = -EPERM;
+       break;
       }
 
       CephXServiceTicketRequest ticket_req;