From 4acc1d685066faa1dc102532ba76a81d3ec6bdc0 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Mon, 2 Aug 2021 12:30:49 -0500 Subject: Use static path for gvproxy Given that we do not want to support gvproxy for anything other than podman machine, we have decided to use a static path of /usr/lib/podman/gvproxy instead of a lookpath. [NO TESTS NEEDED] Signed-off-by: Brent Baude --- pkg/machine/qemu/machine.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 42ae23c43..0740a2b2c 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -603,9 +603,9 @@ func CheckActiveVM() (bool, string, error) { // startHostNetworking runs a binary on the host system that allows users // to setup port forwarding to the podman virtual machine func (v *MachineVM) startHostNetworking() error { - binary, err := exec.LookPath(machine.ForwarderBinaryName) - if err != nil { - return err + binary := filepath.Join("/usr/lib/podman/", machine.ForwarderBinaryName) + if _, err := os.Stat(binary); os.IsNotExist(err) { + return errors.Errorf("unable to find %s", binary) } // Listen on all at port 7777 for setting up and tearing // down forwarding -- cgit v1.2.3-54-g00ecf