mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
Respect "Rootful" when starting WSL API Forwarding
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This commit is contained in:
@ -830,7 +830,15 @@ func launchWinProxy(v *MachineVM) (bool, string, error) {
|
|||||||
return globalName, "", err
|
return globalName, "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
dest := fmt.Sprintf("ssh://root@localhost:%d/run/podman/podman.sock", v.Port)
|
destSock := "/run/user/1000/podman/podman.sock"
|
||||||
|
forwardUser := v.RemoteUsername
|
||||||
|
|
||||||
|
if v.Rootful {
|
||||||
|
destSock = "/run/podman/podman.sock"
|
||||||
|
forwardUser = "root"
|
||||||
|
}
|
||||||
|
|
||||||
|
dest := fmt.Sprintf("ssh://%s@localhost:%d%s", forwardUser, v.Port, destSock)
|
||||||
args := []string{v.Name, stateDir, pipePrefix + machinePipe, dest, v.IdentityPath}
|
args := []string{v.Name, stateDir, pipePrefix + machinePipe, dest, v.IdentityPath}
|
||||||
waitPipe := machinePipe
|
waitPipe := machinePipe
|
||||||
if globalName {
|
if globalName {
|
||||||
|
Reference in New Issue
Block a user