Replace GenerateRandomID with GenerateNonCryptoID

This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6bca8ec3c9ccc169c53b3d7060fe5c8ba8670aac
Component: engine
This commit is contained in:
Alexander Morozov
2015-07-28 22:31:01 -07:00
parent 5ca33487e4
commit 67bf5ba305
11 changed files with 32 additions and 32 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ var globalTestID string
// new directory.
func TestDirectory(templateDir string) (dir string, err error) {
if globalTestID == "" {
globalTestID = stringid.GenerateRandomID()[:4]
globalTestID = stringid.GenerateNonCryptoID()[:4]
}
prefix := fmt.Sprintf("docker-test%s-%s-", globalTestID, GetCallerName(2))
if prefix == "" {