terraform/communicator/ssh
Mitchell Hashimoto 4b1d9cfd7d
communicator/ssh: don't share rand object to guarantee unique values
Fixes #10463

I'm really surprised this flew under the radar for years...

By having unique PRNGs, the SSH communicator could and would
generate identical ScriptPaths and two provisioners running in parallel
could overwrite each other and execute the same script. This would
happen because they're both seeded by the current time which could
potentially be identical if done in parallel...

Instead, we share the rand now so that the sequence is guaranteed
unique. As an extra measure of robustness, we also multiple by the PID
so that we're also protected against two processes at the same time.
2016-12-06 00:21:49 -08:00
..
communicator.go communicator/ssh: don't share rand object to guarantee unique values 2016-12-06 00:21:49 -08:00
communicator_test.go Support recreating clients and configuring Chef Vaults (#8577) 2016-09-15 14:20:18 +02:00
password.go Fix import formatting across code base 2016-04-18 17:28:46 -07:00
password_test.go Fix import formatting across code base 2016-04-18 17:28:46 -07:00
provisioner.go Remove deprecated key_file and bastion_key_file 2016-10-12 14:30:09 -04:00
provisioner_test.go Remove deprecated key_file and bastion_key_file 2016-10-12 14:30:09 -04:00