r36547 - in /desktop/unstable/vinagre/debian: changelog patches/fix-vnc-through-ssh.patch patches/series

sebastien at users.alioth.debian.org sebastien at users.alioth.debian.org
Tue Jan 8 20:22:58 UTC 2013


Author: sebastien
Date: Tue Jan  8 20:22:57 2013
New Revision: 36547

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36547
Log:
* debian/patches/fix-vnc-through-ssh.patch: new patch, fixes VNC
  tunneling through SSH. Closes: #696701


Added:
    desktop/unstable/vinagre/debian/patches/fix-vnc-through-ssh.patch
Modified:
    desktop/unstable/vinagre/debian/changelog
    desktop/unstable/vinagre/debian/patches/series

Modified: desktop/unstable/vinagre/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vinagre/debian/changelog?rev=36547&op=diff
==============================================================================
--- desktop/unstable/vinagre/debian/changelog [utf-8] (original)
+++ desktop/unstable/vinagre/debian/changelog [utf-8] Tue Jan  8 20:22:57 2013
@@ -1,3 +1,10 @@
+vinagre (3.4.2-2) UNRELEASED; urgency=low
+
+  * debian/patches/fix-vnc-through-ssh.patch: new patch, fixes VNC
+    tunneling through SSH. Closes: #696701
+
+ -- Sébastien Villemot <sebastien at debian.org>  Tue, 08 Jan 2013 20:52:39 +0100
+
 vinagre (3.4.2-1) unstable; urgency=low
 
   * New upstream translation release.

Added: desktop/unstable/vinagre/debian/patches/fix-vnc-through-ssh.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vinagre/debian/patches/fix-vnc-through-ssh.patch?rev=36547&op=file
==============================================================================
--- desktop/unstable/vinagre/debian/patches/fix-vnc-through-ssh.patch (added)
+++ desktop/unstable/vinagre/debian/patches/fix-vnc-through-ssh.patch [utf-8] Tue Jan  8 20:22:57 2013
@@ -1,0 +1,137 @@
+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: the 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 <sebastien at debian.org>
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=690449
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696701
+Applied-Upstream: 3.6.3, http://git.gnome.org/browse/vinagre/commit/?h=gnome-3-6&id=5f0688183974e3d5d055b8d136c1ac7ee6e3041c
+Last-Update: 2013-01-08
+---
+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;

Modified: desktop/unstable/vinagre/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/vinagre/debian/patches/series?rev=36547&op=diff
==============================================================================
--- desktop/unstable/vinagre/debian/patches/series [utf-8] (original)
+++ desktop/unstable/vinagre/debian/patches/series [utf-8] Tue Jan  8 20:22:57 2013
@@ -1,0 +1,1 @@
+fix-vnc-through-ssh.patch




More information about the pkg-gnome-commits mailing list