]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: should not set isvalid = true when cephx_verify_authorizer return false 6393/head
authoryangruifeng <yangruifeng.09209@h3c.com>
Mon, 19 Oct 2015 12:08:12 +0000 (08:08 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2015 13:36:24 +0000 (14:36 +0100)
Fixes: #13525
Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
(cherry picked from commit c7f75b8f7c0a773148ec16141941efd00ee76626)

src/mon/Monitor.cc

index 339fd3e6b834ab0d47fc3c4f8f3315fb0dc8d3ad..a3356dd635c3530316ee824bc08527958b2b8c08 100644 (file)
@@ -4161,9 +4161,9 @@ bool Monitor::ms_verify_authorizer(Connection *con, int peer_type,
       CephXServiceTicketInfo auth_ticket_info;
       
       if (authorizer_data.length()) {
-       int ret = cephx_verify_authorizer(g_ceph_context, &keyring, iter,
+       bool ret = cephx_verify_authorizer(g_ceph_context, &keyring, iter,
                                          auth_ticket_info, authorizer_reply);
-       if (ret >= 0) {
+       if (ret) {
          session_key = auth_ticket_info.session_key;
          isvalid = true;
        } else {