diff options
author | Kir Kolyshkin <kolyshkin@gmail.com> | 2022-09-13 15:13:09 -0700 |
---|---|---|
committer | Kir Kolyshkin <kolyshkin@gmail.com> | 2022-09-13 16:26:26 -0700 |
commit | 75740be39541296d379e34902e11ba49e96a1867 (patch) | |
tree | 9b4a5a807803d399787d0466221f25dab6240064 /libpod/runtime_ctr.go | |
parent | c64388728f5efec2658cf9097dbe15126f30753e (diff) | |
download | podman-75740be39541296d379e34902e11ba49e96a1867.tar.gz podman-75740be39541296d379e34902e11ba49e96a1867.tar.bz2 podman-75740be39541296d379e34902e11ba49e96a1867.zip |
all: stop using deprecated GenerateNonCryptoID
In view of https://github.com/containers/storage/pull/1337, do this:
for f in $(git grep -l stringid.GenerateNonCryptoID | grep -v '^vendor/'); do
sed -i 's/stringid.GenerateNonCryptoID/stringid.GenerateRandomID/g' $f;
done
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 |