mirror of
https://github.com/docker/cli.git
synced 2026-11-06 13:10:41 -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
@@ -41,7 +41,7 @@ func (daemon *Daemon) createContainerOSSpecificSettings(container *container.Con
|
||||
}
|
||||
|
||||
for spec := range config.Volumes {
|
||||
name := stringid.GenerateNonCryptoID()
|
||||
name := stringid.GenerateRandomID()
|
||||
destination := filepath.Clean(spec)
|
||||
|
||||
// Skip volumes for which we already have something mounted on that
|
||||
|
||||
@@ -38,7 +38,7 @@ func (daemon *Daemon) createContainerOSSpecificSettings(container *container.Con
|
||||
|
||||
// If the mountpoint doesn't have a name, generate one.
|
||||
if len(mp.Name) == 0 {
|
||||
mp.Name = stringid.GenerateNonCryptoID()
|
||||
mp.Name = stringid.GenerateRandomID()
|
||||
}
|
||||
|
||||
// Skip volumes for which we already have something mounted on that
|
||||
|
||||
@@ -39,7 +39,7 @@ type Config struct {
|
||||
// NewConfig initializes the a new exec configuration
|
||||
func NewConfig() *Config {
|
||||
return &Config{
|
||||
ID: stringid.GenerateNonCryptoID(),
|
||||
ID: stringid.GenerateRandomID(),
|
||||
StreamConfig: stream.NewConfig(),
|
||||
Started: make(chan struct{}),
|
||||
}
|
||||
|
||||
@@ -731,7 +731,7 @@ func BenchmarkConcurrentAccess(b *testing.B) {
|
||||
// create a bunch of ids
|
||||
var ids []string
|
||||
for i := 0; i < numConcurrent; i++ {
|
||||
ids = append(ids, stringid.GenerateNonCryptoID())
|
||||
ids = append(ids, stringid.GenerateRandomID())
|
||||
}
|
||||
|
||||
if err := d.Create(ids[0], "", nil); err != nil {
|
||||
|
||||
@@ -81,7 +81,7 @@ func makePluginCreator(name string, l logPlugin, scopePath func(s string) string
|
||||
return nil, err
|
||||
}
|
||||
|
||||
id := stringid.GenerateNonCryptoID()
|
||||
id := stringid.GenerateRandomID()
|
||||
a := &pluginAdapter{
|
||||
driverName: name,
|
||||
id: id,
|
||||
|
||||
@@ -38,7 +38,7 @@ func (daemon *Daemon) registerName(container *container.Container) error {
|
||||
func (daemon *Daemon) generateIDAndName(name string) (string, string, error) {
|
||||
var (
|
||||
err error
|
||||
id = stringid.GenerateNonCryptoID()
|
||||
id = stringid.GenerateRandomID()
|
||||
)
|
||||
|
||||
if name == "" {
|
||||
|
||||
Reference in New Issue
Block a user