From: Neha Ojha Date: Thu, 29 Aug 2019 17:37:24 +0000 (-0700) Subject: mon/Monitor.cc: fix condition that checks for unrecognized auth mode X-Git-Tag: v14.2.5~158^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31038%2Fhead;p=ceph.git mon/Monitor.cc: fix condition that checks for unrecognized auth mode Introduced by 771682aad09 Fixes:https://tracker.ceph.com/issues/41429 Signed-off-by: Neha Ojha (cherry picked from commit 2758ba1fb9645d2e552545b232de3d36a1f3fae5) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index d16bff32b3d..1c46c38774d 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6227,7 +6227,7 @@ int Monitor::handle_auth_request( } dout(10) << __func__ << " bad authorizer on " << con << dendl; return -EACCES; - } else if (auth_meta->auth_mode < AUTH_MODE_MON && + } else if (auth_meta->auth_mode < AUTH_MODE_MON || auth_meta->auth_mode > AUTH_MODE_MON_MAX) { derr << __func__ << " unrecognized auth mode " << auth_meta->auth_mode << dendl;