Your message dated Tue, 08 Jan 2013 20:47:55 +0000
with message-id <[email protected]>
and subject line Bug#696701: fixed in vinagre 3.4.2-2
has caused the Debian Bug report #696701,
regarding vinagre: tunneling VNC through SSH is broken
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.)


-- 
696701: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696701
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vinagre
Version: 3.4.2-1
Severity: important
Tags: upstream patch
Control: forwarded -1 https://bugzilla.gnome.org/show_bug.cgi?id=690449

Dear Maintainers,

Tunneling VNC connections through SSH does not work. After clicking the
"Connect" button, Vinagre waits a dozen of seconds, then fails with "Connection
to host $HOST was closed".

I identified the cause of the problem as being a blocking read (which ought to
be non-blocking). I attach a patch that fixes the problem for me, and that I
have forwarded upstream.

Cheers,

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages vinagre depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.12.1-3
ii  libavahi-common3                             0.6.31-1
ii  libavahi-gobject0                            0.6.31-1
ii  libavahi-ui-gtk3-0                           0.6.31-1
ii  libc6                                        2.13-37
ii  libcairo2                                    1.12.2-2
ii  libdbus-glib-1-2                             0.100-1
ii  libgdk-pixbuf2.0-0                           2.26.1-1
ii  libglib2.0-0                                 2.33.12+really2.32.4-3
ii  libgnome-keyring0                            3.4.1-1
ii  libgtk-3-0                                   3.4.2-4
ii  libgtk-vnc-2.0-0                             0.5.0-3
ii  libtelepathy-glib0                           0.18.2-2
ii  libvte-2.90-9                                1:0.32.2-1
ii  libxml2                                      2.8.0+dfsg1-7

Versions of packages vinagre recommends:
ii  gnome-icon-theme  3.4.0-2
ii  rdesktop          1.7.1-1

vinagre suggests no packages.

-- no debconf information
Description: Fix VNC tunneling through SSH
 Use GPollableInputStream when checking for SSH errors. Otherwise the read on
 stderr blocks, causing the SSH connection to timeout.
 .
 The original code sets O_NONBLOCK on stderr, but this does not work. This flag
 is not propagated to the corresponding GDataInputStream (at least with glib >=
 2.32; it may have worked with older versions).
 .
 As a side effect, the patch fixes a minor memory leak in
 vinagre-ssh.c:look_for_stderr_errors() where the "line" variable was not
 correctly freed in all cases.
Author: Sébastien Villemot <[email protected]>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=690449
Last-Update: 2012-12-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/vinagre/vinagre-ssh.c
+++ b/vinagre/vinagre-ssh.c
@@ -667,17 +667,30 @@
 }
 
 static gboolean
-look_for_stderr_errors (GDataInputStream *error_stream, GError **error)
+look_for_stderr_errors (GInputStream *is, GError **error)
 {
-  char *line;
+  GDataInputStream *error_stream;
+  char *line = NULL;
+  gboolean ret;
+
+  error_stream = g_data_input_stream_new (is);
 
   while (1)
     {
+#ifndef G_OS_WIN32
+      if (!g_pollable_input_stream_is_readable (G_POLLABLE_INPUT_STREAM (is)))
+        {
+          ret = TRUE;
+          break;
+        }
+#endif
+
       line = g_data_input_stream_read_line (error_stream, NULL, NULL, NULL);
 
       if (line == NULL)
         {
-          return TRUE;
+          ret = TRUE;
+          break;
         }
     
       if (strstr (line, "Permission denied") != NULL)
@@ -685,41 +698,49 @@
           g_set_error_literal (error,
 	                       VINAGRE_SSH_ERROR, VINAGRE_SSH_ERROR_PERMISSION_DENIED,
         	               _("Permission denied"));
-          return FALSE;
+          ret = FALSE;
+          break;
         }
       else if (strstr (line, "Name or service not known") != NULL)
         {
           g_set_error_literal (error,
 	                       VINAGRE_SSH_ERROR, VINAGRE_SSH_ERROR_HOST_NOT_FOUND,
         	               _("Hostname not known"));
-          return FALSE;
+          ret = FALSE;
+          break;
         }
       else if (strstr (line, "No route to host") != NULL)
         {
           g_set_error_literal (error,
 	                       VINAGRE_SSH_ERROR, VINAGRE_SSH_ERROR_HOST_NOT_FOUND,
         	               _("No route to host"));
-          return FALSE;
+          ret = FALSE;
+          break;
         }
       else if (strstr (line, "Connection refused") != NULL)
         {
           g_set_error_literal (error,
 	                       VINAGRE_SSH_ERROR, VINAGRE_SSH_ERROR_PERMISSION_DENIED,
         	               _("Connection refused by server"));
-          return FALSE;
+          ret = FALSE;
+          break;
         }
       else if (strstr (line, "Host key verification failed") != NULL) 
         {
           g_set_error_literal (error,
 	                       VINAGRE_SSH_ERROR, VINAGRE_SSH_ERROR_FAILED,
         	               _("Host key verification failed"));
-          return FALSE;
+          ret = FALSE;
+          break;
         }
       
-      g_free (line);
     }
 
-  return TRUE;
+  if (line)
+    g_free (line);
+
+  g_object_unref (error_stream);
+  return ret;
 }
 
 gboolean
@@ -737,7 +758,6 @@
   gchar *user, *host, **args;
   gboolean res;
   GInputStream *is;
-  GDataInputStream *error_stream;
 
   if (!hostname)
     return FALSE;
@@ -791,14 +811,12 @@
   ioctlsocket (stderr_fd, FIONBIO, &mode);
   is = g_win32_input_stream_new (stderr_fd, FALSE);
 #else /* !G_OS_WIN32 */
-  fcntl (stderr_fd, F_SETFL, O_NONBLOCK | fcntl (stderr_fd, F_GETFL));
   is = g_unix_input_stream_new (stderr_fd, FALSE);
 #endif /* G_OS_WIN32 */
-  error_stream = g_data_input_stream_new (is);
-  g_object_unref (is);
   
-  res = look_for_stderr_errors (error_stream, error);
-  g_object_unref (error_stream);
+  res = look_for_stderr_errors (is, error);
+
+  g_object_unref (is);
 
   if (!res)
     return FALSE;

--- End Message ---
--- Begin Message ---
Source: vinagre
Source-Version: 3.4.2-2

We believe that the bug you reported is fixed in the latest version of
vinagre, 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.
Sébastien Villemot <[email protected]> (supplier of updated vinagre 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: Tue, 08 Jan 2013 21:24:48 +0100
Source: vinagre
Binary: vinagre
Architecture: source amd64
Version: 3.4.2-2
Distribution: unstable
Urgency: low
Maintainer: Debian GNOME Maintainers 
<[email protected]>
Changed-By: Sébastien Villemot <[email protected]>
Description: 
 vinagre    - remote desktop client for the GNOME Desktop
Closes: 696701
Changes: 
 vinagre (3.4.2-2) unstable; urgency=low
 .
   * Team upload.
   * debian/patches/fix-vnc-through-ssh.patch: new patch, fixes VNC
     tunneling through SSH. Closes: #696701
Checksums-Sha1: 
 edfc414f2ece56a2c581c69de4837b314ab47ee6 2397 vinagre_3.4.2-2.dsc
 14d3603d8c5ddd6af6a37510b17a5100d51b3bb5 9011 vinagre_3.4.2-2.debian.tar.gz
 1a22f2e939d4afd400d30dc891ad34bab5f22742 2294490 vinagre_3.4.2-2_amd64.deb
Checksums-Sha256: 
 8d63dd49519421b8e01ec39fb7dd61c8faf428286e91eb2d6864ebfb296a7dd0 2397 
vinagre_3.4.2-2.dsc
 74cb56f3d8e82a7b8179531ec6f3c3d0a8a01547dace64027c7ab4e52754a0b8 9011 
vinagre_3.4.2-2.debian.tar.gz
 acbed4e002a935a7ebf3f3c401541fc1ee1cb5e1643bd9f596ca5b75fc0c9363 2294490 
vinagre_3.4.2-2_amd64.deb
Files: 
 aa47eaf6639996ec55d7eb1c08122851 2397 gnome optional vinagre_3.4.2-2.dsc
 961fb09b5c4adcc4df5afb6b929646fd 9011 gnome optional 
vinagre_3.4.2-2.debian.tar.gz
 64c3337ebfd1a024701b4d8b07a426fa 2294490 gnome optional 
vinagre_3.4.2-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQ7IOXAAoJECzs6TUOzr5KzkcP+gMD7wxYcmhS0tyajSEdPoSB
qmCZwxd5m7vigZVQ+zMkWkoty3GewY8M5eRQuYptDOTy6RxAVohHstPxnbIcfT/G
sLQw2DALYIrge1tX3lTyfruK9WQh6UQMQ76s+fToMoIYwiaCCN89lTlNPO70jz/O
Bya64AvRyiijJ5xAH2rIQyv2j5KMB/TfWt6xBoemMdnFtffeYlOnF3s+ir023zzq
6b9HxQRWFlBSRTaZH6CPOSmZmM0n2PO51xrY/Nwv1V3MQ5/AamrktJBNaQ5b87es
OXlv81Wy4F0yL41iRdjwau+SD4R5TPKdBDZLORSA+60lcMXH8eedJf27Z354jf2R
vRkd/bh2tOt3Xx5ep5IVfh2Zf+orB03b0Z95pQ/8a4/IjEK5DjC1UY87JV4wKqoy
SH76gCtlqBgYElZomWVIoRxAQ9zPwQF9WX4UqgndcIkuR6z2FCGNYnSoMqjNyY0T
khvaNMpEV+4EfAUX4sK+OoglOAsuTPk+cCmPMrkkuG7QgTWWcFRbr08yGPq9l1Oy
iEtbmu88XhWbgW6LbU8liCnwW43/FUBrAs7Wtpm6SIYrVtXQgy8NiIYvhabDIL3w
zZ2xV4ehrjnHw3m+C1jeuE4OznAIH/ySZx6Rsq9kF6JweSeLFcDHM2nUtkJw+vhZ
3S1g2+78oQcdw/c7ZxtY
=mTdM
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to