diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-30 14:22:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-30 14:22:01 -0700 |
commit | ee513cca8612bebfda36e31203ab215aa682e8c0 (patch) | |
tree | 1d9e212c5d3a24608a075882760434d7818278f3 /cmd | |
parent | 319a7a7043c581c9227a07dd98588a0cdf1e7027 (diff) | |
parent | c65b3599cc3ab6972f1b5d96f3e712cd86d74833 (diff) | |
download | podman-ee513cca8612bebfda36e31203ab215aa682e8c0.tar.gz podman-ee513cca8612bebfda36e31203ab215aa682e8c0.tar.bz2 podman-ee513cca8612bebfda36e31203ab215aa682e8c0.zip |
Merge pull request #1704 from giuseppe/attach-cuid-too-long
attach: fix attach when cuid is too long
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/libpodruntime/runtime.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go index df422eb81..a4b3581be 100644 --- a/cmd/podman/libpodruntime/runtime.go +++ b/cmd/podman/libpodruntime/runtime.go @@ -5,6 +5,7 @@ import ( "github.com/containers/libpod/pkg/rootless" "github.com/containers/libpod/pkg/util" "github.com/containers/storage" + "github.com/pkg/errors" "github.com/urfave/cli" ) @@ -42,6 +43,9 @@ func GetRuntimeWithStorageOpts(c *cli.Context, storageOpts *storage.StoreOptions if c.GlobalIsSet("runroot") { storageOpts.RunRoot = c.GlobalString("runroot") } + if len(storageOpts.RunRoot) > 50 { + return nil, errors.New("the specified runroot is longer than 50 characters") + } if c.GlobalIsSet("storage-driver") { storageOpts.GraphDriverName = c.GlobalString("storage-driver") } |