]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: should not set isvalid = true when cephx_verify_authorizer return false 6306/head
authoryangruifeng <yangruifeng.09209@h3c.com>
Mon, 19 Oct 2015 12:08:12 +0000 (08:08 -0400)
committeryangruifeng <yangruifeng.09209@h3c.com>
Mon, 19 Oct 2015 12:54:18 +0000 (08:54 -0400)
Fixes: #13525
Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
src/mon/Monitor.cc

index dcfd5121e85debe1b6b7795f54799669734b9148..58b13cf9294f5ff9fc1a3873c75ef490da53a1c7 100644 (file)
@@ -5004,9 +5004,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 {