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:
@@ -314,7 +314,7 @@ func (graph *Graph) TempLayerArchive(id string, sf *streamformatter.StreamFormat
|
||||
|
||||
// mktemp creates a temporary sub-directory inside the graph's filesystem.
|
||||
func (graph *Graph) mktemp(id string) (string, error) {
|
||||
dir := filepath.Join(graph.root, "_tmp", stringid.GenerateRandomID())
|
||||
dir := filepath.Join(graph.root, "_tmp", stringid.GenerateNonCryptoID())
|
||||
if err := system.MkdirAll(dir, 0700); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user