Fixed refactoring mistakes about loading IAM credentials
This commit is contained in:
committed by
Andrew Gaul
parent
b679e1db98
commit
84dcf34e2c
@ -452,6 +452,11 @@ bool S3fsCred::LoadIAMCredentials()
|
|||||||
S3FS_PRN_ERR("Something error occurred, could not set IAM credentials.");
|
S3FS_PRN_ERR("Something error occurred, could not set IAM credentials.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!SetIAMCredentials(cred.c_str())){
|
||||||
|
S3FS_PRN_ERR("Something error occurred, could not set IAM role name.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,8 +502,6 @@ bool S3fsCred::LoadIAMRoleFromMetaData()
|
|||||||
|
|
||||||
bool S3fsCred::SetIAMCredentials(const char* response)
|
bool S3fsCred::SetIAMCredentials(const char* response)
|
||||||
{
|
{
|
||||||
const std::lock_guard<std::mutex> lock(token_lock);
|
|
||||||
|
|
||||||
S3FS_PRN_INFO3("IAM credential response = \"%s\"", response);
|
S3FS_PRN_INFO3("IAM credential response = \"%s\"", response);
|
||||||
|
|
||||||
iamcredmap_t keyval;
|
iamcredmap_t keyval;
|
||||||
|
|||||||
@ -152,7 +152,7 @@ class S3fsCred
|
|||||||
|
|
||||||
bool GetIAMCredentialsURL(std::string& url, bool check_iam_role) REQUIRES(S3fsCred::token_lock);
|
bool GetIAMCredentialsURL(std::string& url, bool check_iam_role) REQUIRES(S3fsCred::token_lock);
|
||||||
bool LoadIAMCredentials() 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 SetIAMRoleFromMetaData(const char* response);
|
||||||
|
|
||||||
bool SetExtCredLib(const char* arg);
|
bool SetExtCredLib(const char* arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user