aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-04 09:14:15 -0500
committerGitHub <noreply@github.com>2022-02-04 09:14:15 -0500
commit4ad9e0030bc20826f735cf4ec0d5ecc287647218 (patch)
tree7d7bdaea0e8993075ff033f1545d8b8b6eadcffa /cmd/podman/images
parent337f706f6118f2c91e9906afcdaa233f7cfdbaf9 (diff)
parentcad3eb78b4b17e7edec1fdec9ce8a948ab2819e1 (diff)
downloadpodman-4ad9e0030bc20826f735cf4ec0d5ecc287647218.tar.gz
podman-4ad9e0030bc20826f735cf4ec0d5ecc287647218.tar.bz2
podman-4ad9e0030bc20826f735cf4ec0d5ecc287647218.zip
Merge pull request #13133 from mheon/bump_400_rc4
Bump to v4.0.0-RC4
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/scp.go11
-rw-r--r--cmd/podman/images/scp_utils.go3
2 files changed, 13 insertions, 1 deletions
diff --git a/cmd/podman/images/scp.go b/cmd/podman/images/scp.go
index 81dcda123..d07a5d99d 100644
--- a/cmd/podman/images/scp.go
+++ b/cmd/podman/images/scp.go
@@ -146,6 +146,17 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) {
return err
}
+ allLocal := true // if we are all localhost, do not validate connections but if we are using one localhost and one non we need to use sshd
+ for _, val := range cliConnections {
+ if !strings.Contains(val, "@localhost::") {
+ allLocal = false
+ break
+ }
+ }
+ if allLocal {
+ cliConnections = []string{}
+ }
+
var serv map[string]config.Destination
serv, err = GetServiceInformation(cliConnections, cfg)
if err != nil {
diff --git a/cmd/podman/images/scp_utils.go b/cmd/podman/images/scp_utils.go
index c488616c9..a85687a42 100644
--- a/cmd/podman/images/scp_utils.go
+++ b/cmd/podman/images/scp_utils.go
@@ -17,12 +17,13 @@ func parseImageSCPArg(arg string) (*entities.ImageScpOptions, []string, error) {
cliConnections := []string{}
switch {
- case strings.Contains(arg, "@localhost"): // image transfer between users
+ case strings.Contains(arg, "@localhost::"): // image transfer between users
location.User = strings.Split(arg, "@")[0]
location, err = validateImagePortion(location, arg)
if err != nil {
return nil, nil, err
}
+ cliConnections = append(cliConnections, arg)
case strings.Contains(arg, "::"):
location, err = validateImagePortion(location, arg)
if err != nil {