mirror of
https://github.com/containers/podman.git
synced 2025-06-03 03:07:56 +08:00
Update vendor containers/(common, buildah, image, storage)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
13
vendor/github.com/containers/common/pkg/ssh/utils.go
generated
vendored
13
vendor/github.com/containers/common/pkg/ssh/utils.go
generated
vendored
@ -16,10 +16,6 @@ import (
|
||||
)
|
||||
|
||||
func Validate(user *url.Userinfo, path string, port int, identity string) (*config.Destination, *url.URL, error) {
|
||||
sock := ""
|
||||
if strings.Contains(path, "/run") {
|
||||
sock = strings.Split(path, "/run")[1]
|
||||
}
|
||||
// url.Parse NEEDS ssh://, if this ever fails or returns some nonsense, that is why.
|
||||
uri, err := url.Parse(path)
|
||||
if err != nil {
|
||||
@ -43,15 +39,8 @@ func Validate(user *url.Userinfo, path string, port int, identity string) (*conf
|
||||
uri.User = user
|
||||
}
|
||||
|
||||
uriStr := ""
|
||||
if len(sock) > 0 {
|
||||
uriStr = "ssh://" + uri.User.Username() + "@" + uri.Host + "/run" + sock
|
||||
} else {
|
||||
uriStr = "ssh://" + uri.User.Username() + "@" + uri.Host
|
||||
}
|
||||
|
||||
dst := config.Destination{
|
||||
URI: uriStr,
|
||||
URI: uri.String(),
|
||||
}
|
||||
|
||||
if len(identity) > 0 {
|
||||
|
Reference in New Issue
Block a user