Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into s3_ls
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Jun 8, 2024
2 parents eea5ff1 + f5b66a3 commit 49d5673
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/S3FileSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "S3Directory.hh"
#include "S3File.hh"
#include "logging.hh"
#include "shortfile.hh"
#include "stl_string_utils.hh"

#include <XrdOuc/XrdOucEnv.hh>
Expand Down Expand Up @@ -90,6 +91,21 @@ bool S3FileSystem::Config(XrdSysLogger *lp, const char *configfn) {
m_log.Emsg("Config", "s3.region not specified");
return false;
}
std::string contents;
if (newAccessInfo->getS3AccessKeyFile() != "") {
if (!readShortFile(newAccessInfo->getS3AccessKeyFile(),
contents)) {
m_log.Emsg("Config", "s3.access_key_file not readable");
return false;
}
}
if (newAccessInfo->getS3SecretKeyFile() != "") {
if (!readShortFile(newAccessInfo->getS3SecretKeyFile(),
contents)) {
m_log.Emsg("Config", "s3.secret_key_file not readable");
return false;
}
}
newAccessInfo.reset(new S3AccessInfo());
exposedPath = "";
continue;
Expand Down

0 comments on commit 49d5673

Please sign in to comment.