mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Skip early credential checks when iam_role=auto
If user specifies iam_role=auto (or just iam_role), credentials will not be loaded during early phase, so skip credential checks there. Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
This commit is contained in:
parent
c2b7a7e453
commit
594c9ca7d2
@ -4050,6 +4050,11 @@ static int get_access_keys(void)
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
// access key loading is deferred
|
||||
if(load_iamrole){
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
// 1 - keys specified on the command line
|
||||
if(S3fsCurl::IsSetAccessKeyId()){
|
||||
return EXIT_SUCCESS;
|
||||
@ -4815,7 +4820,7 @@ int main(int argc, char* argv[])
|
||||
S3FS_PRN_EXIT("specifying both passwd_file and the access keys options is invalid.");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if(!S3fsCurl::IsPublicBucket()){
|
||||
if(!S3fsCurl::IsPublicBucket() && !load_iamrole){
|
||||
if(EXIT_SUCCESS != get_access_keys()){
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user