Entropy cannot be saved

Remove non cryptographic randomness.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 2df693e533e904f432c59279c07b2b8cbeece4f0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 292b43b15b68cd4b64bfc7b89452dc19ddf2cf48
Component: engine
This commit is contained in:
Justin Cormack
2019-06-18 13:38:50 +01:00
committed by Sebastiaan van Stijn
parent 630cd7d11b
commit 932cc247c5
17 changed files with 34 additions and 78 deletions
@@ -292,7 +292,7 @@ func (p *linuxParser) parseMountSpec(cfg mount.Mount, validateBindSourceExists b
switch cfg.Type {
case mount.TypeVolume:
if cfg.Source == "" {
mp.Name = stringid.GenerateNonCryptoID()
mp.Name = stringid.GenerateRandomID()
} else {
mp.Name = cfg.Source
}
+1 -1
View File
@@ -125,7 +125,7 @@ func (m *MountPoint) Setup(mountLabel string, rootIDs idtools.Identity, checkFun
if m.Volume != nil {
id := m.ID
if id == "" {
id = stringid.GenerateNonCryptoID()
id = stringid.GenerateRandomID()
}
path, err := m.Volume.Mount(id)
if err != nil {
@@ -385,7 +385,7 @@ func (p *windowsParser) parseMountSpec(cfg mount.Mount, destRegex string, conver
switch cfg.Type {
case mount.TypeVolume:
if cfg.Source == "" {
mp.Name = stringid.GenerateNonCryptoID()
mp.Name = stringid.GenerateRandomID()
} else {
mp.Name = cfg.Source
}
+1 -1
View File
@@ -56,7 +56,7 @@ func (s *VolumesService) GetDriverList() []string {
// Create creates a volume
func (s *VolumesService) Create(ctx context.Context, name, driverName string, opts ...opts.CreateOption) (*types.Volume, error) {
if name == "" {
name = stringid.GenerateNonCryptoID()
name = stringid.GenerateRandomID()
}
v, err := s.vs.Create(ctx, name, driverName, opts...)
if err != nil {