diff --git a/packaging/rhel/xrootd.spec.in b/packaging/rhel/xrootd.spec.in index b5780e97f15..6753d2010e8 100644 --- a/packaging/rhel/xrootd.spec.in +++ b/packaging/rhel/xrootd.spec.in @@ -71,7 +71,9 @@ BuildRequires: zlib-devel BuildRequires: ncurses-devel BuildRequires: libcurl-devel BuildRequires: libuuid-devel +%if %{have_macaroons} BuildRequires: libmacaroons-devel +%ensid BuildRequires: json-c-devel BuildRequires: python2-devel diff --git a/src/XrdMacaroons/XrdMacaroons.cc b/src/XrdMacaroons/XrdMacaroons.cc index 0f3f94e808d..4865787f5d1 100644 --- a/src/XrdMacaroons/XrdMacaroons.cc +++ b/src/XrdMacaroons/XrdMacaroons.cc @@ -82,7 +82,7 @@ XrdAccAuthorize *XrdAccAuthorizeObject(XrdSysLogger *log, { return new Macaroons::Authz(log, config, chain_authz); } - catch (std::runtime_error e) + catch (std::runtime_error &e) { XrdSysError err(log, "macaroons"); err.Emsg("Config", "Configuration of Macaroon authorization handler failed", e.what()); @@ -103,7 +103,7 @@ XrdHttpExtHandler *XrdHttpGetExtHandler( { return new Macaroons::Handler(log, config, env, def_authz); } - catch (std::runtime_error e) + catch (std::runtime_error &e) { log->Emsg("Config", "Generation of Macaroon handler failed", e.what()); return NULL;