More SSH port fixes
This commit is contained in:
parent
a57bb22447
commit
39be855f65
21
virt-viewer-0.4.1-sshport2.patch
Normal file
21
virt-viewer-0.4.1-sshport2.patch
Normal file
@ -0,0 +1,21 @@
|
||||
commit 1c00bc2b9541a553c0f6502dadc61eb56edfa355
|
||||
Author: Guido Günther <agx@sigxcpu.org>
|
||||
Date: Fri Aug 12 19:50:22 2011 +0200
|
||||
|
||||
Don't hardcode ssh port to 0
|
||||
|
||||
Many thanks to Luca Capello <luca@pca.it> for debugging this.
|
||||
|
||||
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
|
||||
index 71284b6..2ad5710 100644
|
||||
--- a/src/virt-viewer-app.c
|
||||
+++ b/src/virt-viewer-app.c
|
||||
@@ -1311,7 +1311,7 @@ virt_viewer_app_set_connect_info(VirtViewerApp *self,
|
||||
priv->transport = g_strdup(transport);
|
||||
priv->unixsock = g_strdup(unixsock);
|
||||
priv->user = g_strdup(user);
|
||||
- priv->port = 0;
|
||||
+ priv->port = port;
|
||||
|
||||
virt_viewer_app_update_pretty_address(self);
|
||||
}
|
37
virt-viewer-0.4.1-sshport3.patch
Normal file
37
virt-viewer-0.4.1-sshport3.patch
Normal file
@ -0,0 +1,37 @@
|
||||
commit 60145f31a6fb2c7331101ba4ee7d25d08dd7eb48
|
||||
Author: Guido Günther <agx@sigxcpu.org>
|
||||
Date: Fri Aug 12 19:50:29 2011 +0200
|
||||
|
||||
Don't print incorrect port numbers
|
||||
|
||||
The port isn't 22 when we connect to an alternate port given in
|
||||
.ssh/config.
|
||||
|
||||
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
|
||||
index 2ad5710..c80d52f 100644
|
||||
--- a/src/virt-viewer-app.c
|
||||
+++ b/src/virt-viewer-app.c
|
||||
@@ -635,6 +635,8 @@ virt_viewer_app_activate(VirtViewerApp *self)
|
||||
if (priv->transport &&
|
||||
g_strcasecmp(priv->transport, "ssh") == 0 &&
|
||||
!priv->direct) {
|
||||
+ gchar *p = NULL;
|
||||
+
|
||||
if (priv->gport) {
|
||||
virt_viewer_app_trace(self, "Opening indirect TCP connection to display at %s:%s\n",
|
||||
priv->ghost, priv->gport);
|
||||
@@ -642,8 +644,12 @@ virt_viewer_app_activate(VirtViewerApp *self)
|
||||
virt_viewer_app_trace(self, "Opening indirect UNIX connection to display at %s\n",
|
||||
priv->unixsock);
|
||||
}
|
||||
- virt_viewer_app_trace(self, "Setting up SSH tunnel via %s@%s:%d\n",
|
||||
- priv->user, priv->host, priv->port ? priv->port : 22);
|
||||
+ if (priv->port)
|
||||
+ p = g_strdup_printf(":%d", priv->port);
|
||||
+
|
||||
+ virt_viewer_app_trace(self, "Setting up SSH tunnel via %s@%s%s\n",
|
||||
+ priv->user, priv->host, p ? p : "");
|
||||
+ g_free(p);
|
||||
|
||||
if ((fd = virt_viewer_app_open_tunnel_ssh(priv->host, priv->port,
|
||||
priv->user, priv->ghost,
|
@ -21,13 +21,15 @@
|
||||
|
||||
Name: virt-viewer
|
||||
Version: 0.4.1
|
||||
Release: 2%{?dist}%{?extra_release}
|
||||
Release: 3%{?dist}%{?extra_release}
|
||||
Summary: Virtual Machine Viewer
|
||||
Group: Applications/System
|
||||
License: GPLv2+
|
||||
URL: http://virt-manager.org/
|
||||
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
|
||||
Patch1: %{name}-%{version}-sshport.patch
|
||||
Patch1: %{name}-%{version}-sshport1.patch
|
||||
Patch2: %{name}-%{version}-sshport2.patch
|
||||
Patch3: %{name}-%{version}-sshport3.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: openssh-clients
|
||||
|
||||
@ -83,6 +85,8 @@ browsers.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
|
||||
@ -138,6 +142,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Aug 14 2011 Daniel P. Berrange <berrange@redhat.com> - 0.4.1-3
|
||||
- More ssh tunnelling port fixes
|
||||
|
||||
* Fri Aug 12 2011 Daniel P. Berrange <berrange@redhat.com> - 0.4.1-2
|
||||
- Fix ssh tunnelling
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user