Your message dated Thu, 09 Jun 2016 22:50:36 +0000
with message-id <[email protected]>
and subject line Bug#568707: fixed in vnc4 4.1.1+X4.3.0-38
has caused the Debian Bug report #568707,
regarding xvnc4viewer:  allow -via host:port syntax
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
568707: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568707
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: xvnc4viewer
Version: 4.1.1+X4.3.0-31
Severity: wishlist
Tags: patch

I sometimes have occasion to use xvnc4viewer to access an X display
behind a gateway host whose ssh server listens on a non-standard port.
To date, I've had to use a stub shell script via $VNC_VIA_CMD that
passes the appropriate -p option to ssh.  Other VNC viewer programs I've
used, however, allow the gateway to be specified as "host:port" for
precisely this reason, and I believe this would be useful functionality
to add to xvnc4viewer's -via option.  The necessary modifications are
fairly small; I've attached a patch.  Thank you for your consideration.

                                                -sbigham

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xvnc4viewer depends on:
ii  libc6                  2.10.2-2          GNU C Library: Shared libraries
ii  libgcc1                1:4.3.3-3         GCC support library
ii  libice6                2:1.0.4-1         X11 Inter-Client Exchange library
ii  libsm6                 2:1.0.3-2         X11 Session Management library
ii  libstdc++6             4.3.3-3           The GNU Standard C++ Library v3
ii  libx11-6               2:1.1.5-2         X11 client-side library
ii  libxext6               2:1.0.4-1         X11 miscellaneous extension librar
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

xvnc4viewer recommends no packages.

xvnc4viewer suggests no packages.

-- no debconf information
--- unix/vncviewer/vncviewer.cxx.orig	2010-02-06 16:02:39.000000000 -0500
+++ unix/vncviewer/vncviewer.cxx	2010-02-06 17:42:09.000000000 -0500
@@ -168,9 +168,9 @@
 
 /* Tunnelling support. */
 static void
-interpretViaParam (char **gatewayHost, char **remoteHost,
-                  int *remotePort, char **vncServerName,
-                  int localPort)
+interpretViaParam (char **gatewayHost, int *sshPort,
+                  char **remoteHost, int *remotePort,
+                  char **vncServerName, int localPort)
 {
   const int SERVER_PORT_OFFSET = 5900;
   char *pos = strchr (*vncServerName, ':');
@@ -196,25 +196,39 @@
     *remoteHost = *vncServerName;
 
   *gatewayHost = strDup (via.getValueStr ());
+  pos = strchr (*gatewayHost, ':');
+  if (pos == NULL)
+    *sshPort = 22;
+  else {
+    size_t len;
+    *pos++ = '\0';
+    len = strlen (pos);
+    if (!len || strspn (pos, "0123456789") != len)
+      usage ();
+    *sshPort = atoi (pos);
+  }
+
   *vncServerName = new char[50];
   sprintf (*vncServerName, "localhost::%d", localPort);
 }
 
 static void
-createTunnel (const char *gatewayHost, const char *remoteHost,
-             int remotePort, int localPort)
+createTunnel (const char *gatewayHost, int sshPort,
+             const char *remoteHost, int remotePort, int localPort)
 {
   char *cmd = getenv ("VNC_VIA_CMD");
   char *percent;
-  char lport[10], rport[10];
+  char lport[10], rport[10], sport[10];
   sprintf (lport, "%d", localPort);
   sprintf (rport, "%d", remotePort);
+  sprintf (sport, "%d", sshPort);
   setenv ("G", gatewayHost, 1);
   setenv ("H", remoteHost, 1);
   setenv ("R", rport, 1);
   setenv ("L", lport, 1);
+  setenv ("P", sport, 1);
   if (!cmd)
-    cmd = "/usr/bin/ssh -f -L \"$L\":\"$H\":\"$R\" \"$G\" sleep 20";
+    cmd = "/usr/bin/ssh -f -L \"$L\":\"$H\":\"$R\" -p \"$P\" \"$G\" sleep 20";
   /* Compatibility with TightVNC's method. */
   while ((percent = strchr (cmd, '%')) != NULL)
     *percent = '$';
@@ -272,14 +286,15 @@
     /* Tunnelling support. */
     if (strlen (via.getValueStr ()) > 0) {
       char *gatewayHost = "";
+      int sshPort = 22;
       char *remoteHost = "localhost";
       int localPort = findFreeTcpPort ();
       int remotePort;
       if (!vncServerName)
         usage();
-      interpretViaParam (&gatewayHost, &remoteHost, &remotePort,
+      interpretViaParam (&gatewayHost, &sshPort, &remoteHost, &remotePort,
                         &vncServerName, localPort);
-      createTunnel (gatewayHost, remoteHost, remotePort, localPort);
+      createTunnel (gatewayHost, sshPort, remoteHost, remotePort, localPort);
     }
 
     Socket* sock = 0;
--- unix/vncviewer/vncviewer.man.orig	2010-02-06 16:02:39.000000000 -0500
+++ unix/vncviewer/vncviewer.man	2010-02-06 17:35:46.000000000 -0500
@@ -180,20 +180,23 @@
 prefix from the entries in "/usr/include/X11/keysymdef.h").  Default is F8.
 
 .TP
-\fB\-via\fR \fIgateway\fR
+\fB\-via\fR \fIgateway\fP[:\fIport\fP]
 Automatically create encrypted TCP tunnel to the \fIgateway\fR machine
 before connection, connect to the \fIhost\fR through that tunnel
 (TightVNC\-specific). By default, this option invokes SSH local port
 forwarding, assuming that SSH client binary can be accessed as
-/usr/bin/ssh. Note that when using the \fB\-via\fR option, the host
-machine name should be specified as known to the gateway machine, e.g.
-"localhost" denotes the \fIgateway\fR, not the machine where vncviewer
-was launched. The environment variable \fIVNC_VIA_CMD\fR can override
-the default tunnel command of
-\fB/usr/bin/ssh\ -f\ -L\ "$L":"$H":"$R"\ "$G"\ sleep\ 20\fR.  The tunnel
-command is executed with the environment variables \fIL\fR, \fIH\fR,
-\fIR\fR, and \fIG\fR taken the values of the local port number, the remote
-host, the port number on the remote host, and the gateway machine
+/usr/bin/ssh.  If the SSH server on the gateway machine listens on a
+non-default port, you can specify this port by appending ":" and the port
+number to the gateway name.  Note that when using the \fB\-via\fR option,
+the host machine name should be specified as known to the gateway machine,
+e.g. "localhost" denotes the \fIgateway\fR, not the machine where
+vncviewer was launched. The environment variable \fIVNC_VIA_CMD\fR can
+override the default tunnel command of
+\fB/usr/bin/ssh\ -f\ -L\ "$L":"$H":"$R"\ -p\ "$P"\ "$G"\ sleep\ 20\fR.  The
+tunnel command is executed with the environment variables \fIL\fR, \fIH\fR,
+\fIR\fR, \fIG\fR and \fIP\fR taken the values of the local port number, the
+remote host, the port number on the remote host, the gateway machine, and
+the SSH server port on the gateway machine (22 if not specified),
 respectively.
 
 .SH SEE ALSO

--- End Message ---
--- Begin Message ---
Source: vnc4
Source-Version: 4.1.1+X4.3.0-38

We believe that the bug you reported is fixed in the latest version of
vnc4, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ola Lundqvist <[email protected]> (supplier of updated vnc4 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 09 Jun 2016 22:46:59 +0200
Source: vnc4
Binary: vnc4server xvnc4viewer
Architecture: source amd64
Version: 4.1.1+X4.3.0-38
Distribution: unstable
Urgency: low
Maintainer: Ola Lundqvist <[email protected]>
Changed-By: Ola Lundqvist <[email protected]>
Description:
 vnc4server - Virtual network computing server software
 xvnc4viewer - Virtual network computing client software for X
Closes: 421815 471996 492015 568707 610852 640158 656862 767957 780804
Changes:
 vnc4 (4.1.1+X4.3.0-38) unstable; urgency=low
 .
   * Updated to debhelper compatibility 9.
   * Applied a patch from Timo Juhani Lindfors <[email protected]>
     that solves a segfault problem. Closes: #492015.
   * Applied a patch from Scott Bigham <[email protected]> to allow
     the -via option. Closes: #568707.
   * Applied a patch from Moritz Muehlenhoff <[email protected]> to enable
     harden build flags. Closes: #656862.
   * Applied a patch from Tristan Schmelcher
     <[email protected]> to avoid a 100% CPU problem.
     Closes: #640158.
   * Changed the default generated init script. Closes: #471996.
   * Applied a patch to solve a segfault problem. Closes: #421815.
   * Applied a patch to make it build on hurd-i386. Closes: #610852.
   * Applied a patch to make it build on ppc64el. Closes: #767957.
   * Applied a patch to make it build on mips64el. Closes: #780804.
Checksums-Sha1:
 1652c4e2ebeeca14dced23d9179a79a249f6bfe1 1795 vnc4_4.1.1+X4.3.0-38.dsc
 8416eb9433713cffeb5469c9d7c62ac289d5d191 77056 vnc4_4.1.1+X4.3.0-38.diff.gz
 35e2ef95b393fc30a3148c43c47c624318961a4d 1593876 
vnc4server_4.1.1+X4.3.0-38_amd64.deb
 bc1912f9ecf9a1e7b4495fa6adb1f75d98d0fc65 124962 
xvnc4viewer_4.1.1+X4.3.0-38_amd64.deb
Checksums-Sha256:
 2ec804a584c8dfe6ee0b6403c065a89f30d5fc23bc1f960c2f478c769dc16e71 1795 
vnc4_4.1.1+X4.3.0-38.dsc
 fdb1e84ad60a8232b577dcedebfbd25434caa62237569c0086b080464602a79e 77056 
vnc4_4.1.1+X4.3.0-38.diff.gz
 fd44173ebc30e35b97eb92acf62c06f365114f320112a12cd6a5e91ee45c543e 1593876 
vnc4server_4.1.1+X4.3.0-38_amd64.deb
 013cbb255b0b291db68fd9403e3777614ef49cf884da3d0785fc6d686054898c 124962 
xvnc4viewer_4.1.1+X4.3.0-38_amd64.deb
Files:
 e5a63dd6acd352c95dab53f3e0634ad9 1795 x11 optional vnc4_4.1.1+X4.3.0-38.dsc
 6946d175a84f7dc1697dd0a5235113cf 77056 x11 optional 
vnc4_4.1.1+X4.3.0-38.diff.gz
 2af3ffdca304dcfd699263adc614a699 1593876 x11 optional 
vnc4server_4.1.1+X4.3.0-38_amd64.deb
 0a988f7e1b0696ba4d4737b991881cef 124962 net optional 
xvnc4viewer_4.1.1+X4.3.0-38_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXWd/yAAoJEF6Q3PqUJodvf+8P/jvvL9KUfFZIYdWHFZpiGi5R
gE/VvcxFok1a7yQQ5nHaU4LCgfjUUo8Dqztm2irCh27VWQugorySVzsgluIz9Rqy
NnOr0/GX+W5gZlO+FpG2lYTkZC1ewhMAgOEfj3pd8FqFN4JoKzRrP+XLgGdhmewW
4rHJlibRbZcurzm5bxNkt+Byy2K0gTkG8HNf/0ajXsEBpvxElKlRKe8ay5c56dka
qcb5pwT/w5K/D5npldFagMcItDjoaGvmHgugn/M/dKfHTUwf5S3NRO/L0XT9ABbA
AloIdpQstua9OI7H3DtRSBQv6L2xo9kEVqOZsDjwwCRLp0MEQyHb5DWgAWUY4gcQ
4aa2exR2VmSJ5KskZKAZ0vBlI9w2dzWSnACTJy/jinPSQ9smplQ1xWdA5S82M8qj
lJ+1zWWfH32HS8cEqk5txZ4WAEc+lBE0visgNmNxdGMXqLykoYKkJv0Rr6sS81Xi
LC+l+oI76/BmNzR6DkP9dURxkSs2SxNkbCI8kj6n+c45nSlVvGTEyAT2Ewz9eCuE
Ak4f1v0BVlw/c+HyYP5YWBoh+TFuBd/s5qyEFqZOD1KhfURorqxx6BwJOl4XBlL8
FOjVCQtb2ibkuvdt+F4qep/78SI5Qo87tMoXIWwfyPVQGrjuZmREzpZgWCF+rId0
dNmwKDliVgVfsXeK5w5u
=LTUN
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to