]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw : catch non int exception 37926/head
authorcao.leilc <cao.leilc@inspur.com>
Tue, 3 Nov 2020 01:16:11 +0000 (09:16 +0800)
committercao.leilc <cao.leilc@inspur.com>
Mon, 9 Nov 2020 01:43:39 +0000 (09:43 +0800)
Fixes: https://tracker.ceph.com/issues/48034
Signed-off-by: caolei <halei15848934852@163.com>
src/rgw/rgw_auth.cc

index 1602c957e23cd6fc893b383b8cd4840df439cec0..52455774af39dff5f39d366eb25fb7777bbc8c5c 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. */