[Pkg-libvirt-commits] [SCM] VirtViewer Debian packaging branch, master, updated. debian/0.4.1-2
Guido Günther
agx at sigxcpu.org
Fri Aug 12 17:25:32 UTC 2011
The following commit has been merged in the master branch:
commit 599a1e122b97559022422323fea910a4f1b19c10
Author: Guido Günther <agx at sigxcpu.org>
Date: Fri Aug 12 19:07:39 2011 +0200
Really fix using alternate ssh ports
Many,many thanks to Luca Capello for debugging this and for providing a
patch.
Closes: #637548
diff --git a/debian/patches/0001-Really-fix-using-alternate-ssh-ports.patch b/debian/patches/0001-Really-fix-using-alternate-ssh-ports.patch
new file mode 100644
index 0000000..431f4b5
--- /dev/null
+++ b/debian/patches/0001-Really-fix-using-alternate-ssh-ports.patch
@@ -0,0 +1,68 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 12 Aug 2011 19:05:11 +0200
+Subject: Really fix using alternate ssh ports
+
+Many,many thanks to Luca Capello for debugging this.
+
+Closes: #637548
+---
+ src/virt-viewer-app.c | 18 ++++++++++++++----
+ 1 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
+index 918e788..6d3d9be 100644
+--- a/src/virt-viewer-app.c
++++ b/src/virt-viewer-app.c
+@@ -319,7 +319,7 @@ virt_viewer_app_open_tunnel_ssh(const char *sshhost,
+ int n = 0;
+
+ cmd[n++] = "ssh";
+- if (!sshport) {
++ if (sshport) {
+ cmd[n++] = "-p";
+ sprintf(portstr, "%d", sshport);
+ cmd[n++] = portstr;
+@@ -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,14 +644,22 @@ 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%s\n",
++ priv->user ? priv->user : "",
++ 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,
+ priv->gport, priv->unixsock)) < 0)
+ return -1;
+ } else if (priv->unixsock) {
++
++
+ virt_viewer_app_trace(self, "Opening direct UNIX connection to display at %s",
+ priv->unixsock);
+ if ((fd = virt_viewer_app_open_unix_sock(priv->unixsock)) < 0)
+@@ -1311,7 +1321,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);
+ }
+--
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0a337f3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Really-fix-using-alternate-ssh-ports.patch
--
VirtViewer Debian packaging
More information about the Pkg-libvirt-commits
mailing list