mirror of
https://github.com/docker/cli.git
synced 2026-11-06 21:18:28 -04:00
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:
committed by
Sebastiaan van Stijn
parent
630cd7d11b
commit
932cc247c5
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user