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: v15.1.0~1651^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2758ba1fb9645d2e552545b232de3d36a1f3fae5;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 --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 0d36fb1b091d..2a1920dbd7d8 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6217,7 +6217,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;