]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: should not set isvalid = true when cephx_verify_authorizer return false 6391/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:28:00 +0000 (14:28 +0100)
Fixes: #13525
Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
(cherry picked from commit c7f75b8f7c0a773148ec16141941efd00ee76626)

src/mon/Monitor.cc

index ba2aecfe2dd7d44c93eeecc74f5eff25480fe612..4d33cd53342b1afbea9cb48c9a0c1346956a2277 100644 (file)
@@ -4656,9 +4656,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 {