Fixed refactoring mistakes about loading IAM credentials

This commit is contained in:
Takeshi Nakatani 2025-01-18 15:30:22 +00:00 committed by Andrew Gaul
parent b679e1db98
commit 84dcf34e2c
2 changed files with 6 additions and 3 deletions

View File

@ -452,6 +452,11 @@ bool S3fsCred::LoadIAMCredentials()
S3FS_PRN_ERR("Something error occurred, could not set IAM credentials.");
return false;
}
if(!SetIAMCredentials(cred.c_str())){
S3FS_PRN_ERR("Something error occurred, could not set IAM role name.");
return false;
}
return true;
}
@ -497,8 +502,6 @@ bool S3fsCred::LoadIAMRoleFromMetaData()
bool S3fsCred::SetIAMCredentials(const char* response)
{
const std::lock_guard<std::mutex> lock(token_lock);
S3FS_PRN_INFO3("IAM credential response = \"%s\"", response);
iamcredmap_t keyval;

View File

@ -152,7 +152,7 @@ class S3fsCred
bool GetIAMCredentialsURL(std::string& url, bool check_iam_role) REQUIRES(S3fsCred::token_lock);
bool LoadIAMCredentials() REQUIRES(S3fsCred::token_lock);
bool SetIAMCredentials(const char* response);
bool SetIAMCredentials(const char* response) REQUIRES(S3fsCred::token_lock);
bool SetIAMRoleFromMetaData(const char* response);
bool SetExtCredLib(const char* arg);