[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#854879: marked as done (unblock: tigervnc/1.7.0+dfsg-6)



Your message dated Sat, 11 Feb 2017 13:45:00 +0000
with message-id <24756a58-e406-dbcd-e695-6b625e28c86c@thykier.net>
and subject line Re: Bug#854879: unblock: tigervnc/1.7.0+dfsg-6
has caused the Debian Bug report #854879,
regarding unblock: tigervnc/1.7.0+dfsg-6
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 owner@bugs.debian.org
immediately.)


-- 
854879: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854879
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package tigervnc. The latest release in unstable fixes
two bugs:

- Applied upstream patch [PATCH] Fix -inetd not working with xserver >=
  1.19. (Closes: #852633)
- Fix server side cursor support for Xorg server >= 1.19. (Closes: #852639)

The patch to fix 852633 is also used in Fedora 25 to fix the same
problem (https://bugzilla.redhat.com/show_bug.cgi?id=1408724) and
committed by 712cf8673d6e57442f41636e44020f5e1839c7f8 into upstream.
Fedora 25 uses the same configuration of TigerVNC, i.e., A patched
TigerVNC 1.7.0 release to add compatibility for Xorg server == 1.19, as
is used in debian stretch. Thus, the patch to close #852633 is already
well tested.

The fix to close #852639 is more urgent as, otherwise, tigervnc as
present in debian stretch is unable to correctly work with clients only
supporting the RFB 3.3 protocol specification. The problem stems from
the fact that tigervnc does not propagate the mouse pointer position to
draw a mouse cursor on the server side, i.e., by the Xorg server, in the
code path to support the Xorg server >= 1.19. In clients supporting RFB
protocol version > 3.3 this problem is hidden, as RFB 3.7 introduced
client side cursor drawing. Fortunately, this can be fixed quite easily
by copying the code snippet responsible for propagating the cursor
position from the code path for Xorg server < 1.19 into the code path
for Xorg server >= 1.19.

unblock tigervnc/1.7.0+dfsg-6

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru tigervnc-1.7.0+dfsg/debian/changelog tigervnc-1.7.0+dfsg/debian/changelog
--- tigervnc-1.7.0+dfsg/debian/changelog	2017-02-04 01:55:24.000000000 +0100
+++ tigervnc-1.7.0+dfsg/debian/changelog	2017-02-09 23:51:56.000000000 +0100
@@ -1,3 +1,14 @@
+tigervnc (1.7.0+dfsg-6) unstable; urgency=high
+
+  [ Joachim Falk ]
+  * Fix server side cursor support for Xorg server >= 1.19. Closes: #852639
+  * Applied upstream patch [PATCH] Fix -inetd not working with xserver >=
+    1.19. Closes: #852633.
+  * Fixed documentation of default value for -depth option in tigervncserver
+    man page.
+
+ -- Ola Lundqvist <opal@debian.org>  Thu, 09 Feb 2017 23:51:56 +0100
+
 tigervnc (1.7.0+dfsg-5) unstable; urgency=medium
 
   [ Ola Lundqvist ]
diff -Nru tigervnc-1.7.0+dfsg/debian/helpers/usr/share/man/man1/tigervncserver.1 tigervnc-1.7.0+dfsg/debian/helpers/usr/share/man/man1/tigervncserver.1
--- tigervnc-1.7.0+dfsg/debian/helpers/usr/share/man/man1/tigervncserver.1	2017-01-28 21:05:18.000000000 +0100
+++ tigervnc-1.7.0+dfsg/debian/helpers/usr/share/man/man1/tigervncserver.1	2017-02-09 23:44:12.000000000 +0100
@@ -137,8 +137,8 @@
 .
 .TP
 .B \-depth \fIdepth\fP
-Specify the pixel depth in bits of the desktop to be created. Default is 16,
-other possible values are 8, 15 and 24 - anything else is likely to cause
+Specify the pixel depth in bits of the desktop to be created. Default is 24,
+other possible values are 8, 15 and 16 - anything else is likely to cause
 strange behavior by applications.
 .
 .TP
diff -Nru tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-inetd-mode.patch tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-inetd-mode.patch
--- tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-inetd-mode.patch	1970-01-01 01:00:00.000000000 +0100
+++ tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-inetd-mode.patch	2017-02-09 23:44:12.000000000 +0100
@@ -0,0 +1,42 @@
+From 712cf8673d6e57442f41636e44020f5e1839c7f8 Mon Jan 9 16:03:30 2017 +0100
+Author: Hans de Goede <hdegoede@redhat.com>
+Date: Mon Jan 9 16:03:30 2017 +0100
+Subject: [PATCH] Fix -inetd not working with xserver >= 1.19
+
+xserver 1.19's OsInit will create a pollfd, followed by checking if fd 2 /
+stderr is writable and if it is not, replacing fd 2 with /dev/null.
+
+Since we close stderr in inetd mode to avoid xserver messages being send
+to the client as vnc data, the pollfd becomes fd 2, only to be replaced
+by /dev/null since a pollfd is not writable.
+
+This commit fixes this by opening /dev/null directly after the close(2),
+avoiding that the pollfd becomes fd 2.
+
+Alan Coopersmith: Change to use dup2() for atomic switch of fd
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+
+diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
+index c5b684de..ef30d69a 100644
+--- a/unix/xserver/hw/vnc/xvnc.c
++++ b/unix/xserver/hw/vnc/xvnc.c
+@@ -572,9 +572,17 @@ ddxProcessArgument(int argc, char *argv[], int i)
+ 
+     if (strcmp(argv[i], "-inetd") == 0)
+     {
++	int nullfd;
++
+ 	dup2(0,3);
+ 	vncInetdSock = 3;
+-	close(2);
++
++	/* Avoid xserver >= 1.19's epoll-fd becoming fd 2 / stderr only to be
++	   replaced by /dev/null by OsInit() because the pollfd is not
++	   writable, breaking ospoll_wait(). */
++	nullfd = open("/dev/null", O_WRONLY);
++	dup2(nullfd, 2);
++	close(nullfd);
+ 	
+ 	if (!displaySpecified) {
+ 	    int port = vncGetSocketPort(vncInetdSock);
diff -Nru tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-server-side-cursor.patch tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-server-side-cursor.patch
--- tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-server-side-cursor.patch	1970-01-01 01:00:00.000000000 +0100
+++ tigervnc-1.7.0+dfsg/debian/patches/fix-xorg1.19-server-side-cursor.patch	2017-02-09 23:44:12.000000000 +0100
@@ -0,0 +1,45 @@
+Author: Joachim Falk <joachim.falk@gmx.de>
+Date: Mon, 06 Feb 2017 23:34:35 +0100
+Subject: [PATCH] Fix server side cursor support for Xorg server >= 1.19
+
+This is a minimal backport of the fix applied by Pierre Ossman on 2016-10-05 in
+the commit b192107b302098864358cd54b6323129c23e271e on TigerVNC master while
+unifying some code paths for Xorg server < 1.19 and >= 1.19.
+
+The function XserverDesktop::readWakeupHandler is used by the code path for
+Xorg server < 1.19. Here, the mouse movement is propagated from the VNC client
+to the server via the following code snippet:
+
+  // We are responsible for propagating mouse movement between clients
+  int cursorX, cursorY;
+  vncGetPointerPos(&cursorX, &cursorY);
+  if (oldCursorPos.x != cursorX || oldCursorPos.y != cursorY) {
+    oldCursorPos.x = cursorX;
+    oldCursorPos.y = cursorY;
+    server->setCursorPos(oldCursorPos);
+  }
+
+The corresponding function XserverDesktop::blockHandler, which is used by
+the Xorg server >= 1.19 code path, was missing this. Hence, this patches adds
+the missing cursor propagation code.
+
+Index: pkg-tigervnc/unix/xserver/hw/vnc/XserverDesktop.cc
+===================================================================
+--- pkg-tigervnc.orig/unix/xserver/hw/vnc/XserverDesktop.cc
++++ pkg-tigervnc/unix/xserver/hw/vnc/XserverDesktop.cc
+@@ -556,6 +556,15 @@ void XserverDesktop::blockHandler(int* timeout)
+       }
+     }
+ 
++    // We are responsible for propagating mouse movement between clients
++    int cursorX, cursorY;
++    vncGetPointerPos(&cursorX, &cursorY);
++    if (oldCursorPos.x != cursorX || oldCursorPos.y != cursorY) {
++      oldCursorPos.x = cursorX;
++      oldCursorPos.y = cursorY;
++      server->setCursorPos(oldCursorPos);
++    }
++
+     int nextTimeout = server->checkTimeouts();
+     if (nextTimeout > 0 && (*timeout == -1 || nextTimeout < *timeout))
+       *timeout = nextTimeout;
diff -Nru tigervnc-1.7.0+dfsg/debian/patches/series tigervnc-1.7.0+dfsg/debian/patches/series
--- tigervnc-1.7.0+dfsg/debian/patches/series	2017-01-30 14:09:04.000000000 +0100
+++ tigervnc-1.7.0+dfsg/debian/patches/series	2017-02-09 23:44:12.000000000 +0100
@@ -42,6 +42,10 @@
 # fix-build-error-with-xserver-1.18.patch # applied upstream
 fix-build-error-with-xserver-1.19.patch
 v2-Add-xorg-xserver-1.19-support-to-tigervnc.patch
+fix-xorg1.19-inetd-mode.patch
+fix-xorg1.19-server-side-cursor.patch
+
+# The following patches are security fixes
 CVE-2014-8240-849479.patch
 CVE-2014-8241-849478.patch
 Fix-buffer-overflow-in-ModifiablePixelBuffer-fillRec.patch

--- End Message ---
--- Begin Message ---
Joachim Falk:
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Please unblock package tigervnc. The latest release in unstable fixes
> two bugs:
> 
> - Applied upstream patch [PATCH] Fix -inetd not working with xserver >=
>   1.19. (Closes: #852633)
> - Fix server side cursor support for Xorg server >= 1.19. (Closes: #852639)
> 
> [...]
> 
> unblock tigervnc/1.7.0+dfsg-6
> 
> [...]

Unblocked, thanks.

~Niels

--- End Message ---

Reply to: