Skip to content

Commit

Permalink
Provide a pure-environment override for the XrdTpc cadir.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Mar 18, 2021
1 parent 75f631e commit c84668f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/XrdTpc/XrdTpcConfigure.cc
Expand Up @@ -68,10 +68,17 @@ bool TPCHandler::Configure(const char *configfn, XrdOucEnv *myEnv)
}
Config.Close();

// Internal override: allow xrdtpc to use a different ca dir from the one prepared by the xrootd
// framework. meant for exceptional situations where the site might need a specially-prepared set
// of cas only for tpc (such as trying out various workarounds for libnss). Explicitly disables
// the NSS hack below.
auto env_cadir = getenv("XRDTPC_CADIR");
if (env_cadir) m_cadir = env_cadir;

const char *cadir = nullptr, *cafile = nullptr;
if ((cadir = myEnv->Get("http.cadir"))) {
if ((cadir = env_cadir ? env_cadir : myEnv->Get("http.cadir"))) {
m_cadir = cadir;
if (XrdTpcNSSSupport::NeedsNSSHack()) {
if (!env_cadir && XrdTpcNSSSupport::NeedsNSSHack()) {
m_nss_hack.reset(new XrdTpcNSSSupport(&m_log, m_cadir));
}
}
Expand Down

0 comments on commit c84668f

Please sign in to comment.