]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw : catch non int exception 39746/head
authorcao.leilc <cao.leilc@inspur.com>
Tue, 3 Nov 2020 01:16:11 +0000 (09:16 +0800)
committerPonnuvel Palaniyappan <ponnuvel.palaniyappan@canonical.com>
Sun, 28 Feb 2021 13:43:16 +0000 (13:43 +0000)
Fixes: https://tracker.ceph.com/issues/48034
Signed-off-by: caolei <halei15848934852@163.com>
(cherry picked from commit bfd20a5436548132d5db41f532deee249c5cc6b7)

src/rgw/rgw_auth.cc

index 60b01d8588efb2df119bccba14582915827f76e7..2c60454e419478aba5c8979516527ce4e057068f 100644 (file)
@@ -323,10 +323,17 @@ rgw::auth::Strategy::apply(const DoutPrefixProvider *dpp, const rgw::auth::Strat
     } catch (const int err) {
       ldpp_dout(dpp, 5) << "applier throwed err=" << err << dendl;
       return err;
+    } catch (const std::exception& e) {
+      ldpp_dout(dpp, 5) << "applier throwed unexpected err: " << e.what()
+                        << dendl;
+      return -EPERM;
     }
   } catch (const int err) {
     ldpp_dout(dpp, 5) << "auth engine throwed err=" << err << dendl;
     return err;
+  } catch (const std::exception& e) {
+    ldpp_dout(dpp, 5) << "auth engine throwed unexpected err: " << e.what()
+                      << dendl;
   }
 
   /* We never should be here. */