summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-14 16:17:37 +0200
committerGitHub <noreply@github.com>2022-09-14 16:17:37 +0200
commit017d81ddd0e8d228aadb949175c0aae1e4b9d925 (patch)
tree4036fd98987b27d78f090a46e108889450267860 /libpod
parenta3876c2f854b6de58c7259f09eff0ec2b126f007 (diff)
parent75740be39541296d379e34902e11ba49e96a1867 (diff)
downloadpodman-017d81ddd0e8d228aadb949175c0aae1e4b9d925.tar.gz
podman-017d81ddd0e8d228aadb949175c0aae1e4b9d925.tar.bz2
podman-017d81ddd0e8d228aadb949175c0aae1e4b9d925.zip
Merge pull request #15788 from kolyshkin/non-crypto-id
all: stop using deprecated GenerateNonCryptoID
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_exec.go4
-rw-r--r--libpod/pod_internal.go2
-rw-r--r--libpod/runtime_ctr.go6
-rw-r--r--libpod/runtime_volume_linux.go2
4 files changed, 7 insertions, 7 deletions
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index ca3961d8a..3a2cba52f 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -182,7 +182,7 @@ func (c *Container) ExecCreate(config *ExecConfig) (string, error) {
}
// Generate an ID for our new exec session
- sessionID := stringid.GenerateNonCryptoID()
+ sessionID := stringid.GenerateRandomID()
found := true
// This really ought to be a do-while, but Go doesn't have those...
for found {
@@ -194,7 +194,7 @@ func (c *Container) ExecCreate(config *ExecConfig) (string, error) {
}
}
if found {
- sessionID = stringid.GenerateNonCryptoID()
+ sessionID = stringid.GenerateRandomID()
}
}
diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go
index 9f89fd55d..d63bff2c9 100644
--- a/libpod/pod_internal.go
+++ b/libpod/pod_internal.go
@@ -16,7 +16,7 @@ import (
func newPod(runtime *Runtime) *Pod {
pod := new(Pod)
pod.config = new(PodConfig)
- pod.config.ID = stringid.GenerateNonCryptoID()
+ pod.config.ID = stringid.GenerateRandomID()
pod.config.Labels = make(map[string]string)
pod.config.CreatedTime = time.Now()
// pod.config.InfraContainer = new(ContainerConfig)
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index c9dc74403..1f032dd6b 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -169,7 +169,7 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
ctr.state = new(ContainerState)
if config == nil {
- ctr.config.ID = stringid.GenerateNonCryptoID()
+ ctr.config.ID = stringid.GenerateRandomID()
size, err := units.FromHumanSize(r.config.Containers.ShmSize)
if useDevShm {
if err != nil {
@@ -193,7 +193,7 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
}
// If the ID is empty a new name for the restored container was requested
if ctr.config.ID == "" {
- ctr.config.ID = stringid.GenerateNonCryptoID()
+ ctr.config.ID = stringid.GenerateRandomID()
}
// Reset the log path to point to the default
ctr.config.LogPath = ""
@@ -466,7 +466,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
if vol.Name == "" {
// Anonymous volume. We'll need to create it.
// It needs a name first.
- vol.Name = stringid.GenerateNonCryptoID()
+ vol.Name = stringid.GenerateRandomID()
isAnonymous = true
} else {
// Check if it exists already
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index 65f2a1005..c9a4a7dc1 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -42,7 +42,7 @@ func (r *Runtime) newVolume(noCreatePluginVolume bool, options ...VolumeCreateOp
}
if volume.config.Name == "" {
- volume.config.Name = stringid.GenerateNonCryptoID()
+ volume.config.Name = stringid.GenerateRandomID()
}
if volume.config.Driver == "" {
volume.config.Driver = define.VolumeDriverLocal