enum credentials_obtained obtained)
{
if (obtained >= cred->principal_obtained) {
+ struct loadparm_context *lp_ctx;
+ bool ok;
+
cred->principal = talloc_strdup(cred, val);
if (cred->principal == NULL) {
return false;
cred->principal_obtained = obtained;
cli_credentials_invalidate_ccache(cred, cred->principal_obtained);
- return true;
+
+ lp_ctx = loadparm_init_s3(cred, loadparm_s3_helpers());
+ if (lp_ctx == NULL) {
+ return false;
+ }
+ ok = cli_credentials_ccache_reinit(cred, lp_ctx);
+ talloc_free(lp_ctx);
+
+ return ok;
}
return false;