summaryrefslogtreecommitdiff
path: root/pkg/util/utils.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-04-27 15:48:04 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-05-04 12:11:32 -0400
commit5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8 (patch)
treec1700e0bbdfd923e6a76406bc6078df80f1d74b8 /pkg/util/utils.go
parentb1e9ea38e5a680afb9294cb8a451311991d94765 (diff)
downloadpodman-5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8.tar.gz
podman-5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8.tar.bz2
podman-5fa6f686dbeaf04e1df8a888b9458c3d7f42eee8.zip
Report correct RemoteURI
Rather than assuming a filesystem path, the API service URI is recorded in the libpod runtime configuration and then reported as requested. Note: All schemes other than "unix" are hard-coded to report URI exists. Fixes #12023 Signed-off-by: Jhon Honce <jhonce@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r--pkg/util/utils.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index 9842a0f73..a0bf8b50d 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -731,29 +731,6 @@ func IDtoolsToRuntimeSpec(idMaps []idtools.IDMap) (convertedIDMap []specs.LinuxI
return convertedIDMap
}
-var socketPath string
-
-func SetSocketPath(path string) {
- socketPath = path
-}
-
-func SocketPath() (string, error) {
- if socketPath != "" {
- return socketPath, nil
- }
- xdg, err := GetRuntimeDir()
- if err != nil {
- return "", err
- }
- if len(xdg) == 0 {
- // If no xdg is returned, assume root socket
- xdg = "/run"
- }
-
- // Glue the socket path together
- return filepath.Join(xdg, "podman", "podman.sock"), nil
-}
-
func LookupUser(name string) (*user.User, error) {
// Assume UID look up first, if it fails lookup by username
if u, err := user.LookupId(name); err == nil {