Make Xvnc buildable against X.Org 1.11
Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
parent
c2263a87d8
commit
6db666fe0e
@ -1,6 +1,6 @@
|
|||||||
Name: tigervnc
|
Name: tigervnc
|
||||||
Version: 1.0.90
|
Version: 1.0.90
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: A TigerVNC remote display system
|
Summary: A TigerVNC remote display system
|
||||||
|
|
||||||
Group: User Interface/Desktops
|
Group: User Interface/Desktops
|
||||||
@ -47,6 +47,7 @@ Patch12: tigervnc11-glx.patch
|
|||||||
Patch13: tigervnc11-rh692048.patch
|
Patch13: tigervnc11-rh692048.patch
|
||||||
Patch14: 0001-Use-memmove-instead-of-memcpy-in-fbblt.c-when-memory.patch
|
Patch14: 0001-Use-memmove-instead-of-memcpy-in-fbblt.c-when-memory.patch
|
||||||
Patch15: tigervnc11-CVE-2011-1775.patch
|
Patch15: tigervnc11-CVE-2011-1775.patch
|
||||||
|
Patch16: tigervnc11-xorg111.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Virtual Network Computing (VNC) is a remote display system which
|
Virtual Network Computing (VNC) is a remote display system which
|
||||||
@ -146,6 +147,7 @@ patch -p1 -b --suffix .vnc < %{SOURCE7}
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%patch15 -p0 -b .CVE-2011-1775
|
%patch15 -p0 -b .CVE-2011-1775
|
||||||
|
%patch16 -p1 -b .xorg111
|
||||||
|
|
||||||
# Use newer gettext
|
# Use newer gettext
|
||||||
sed -i 's/AM_GNU_GETTEXT_VERSION.*/AM_GNU_GETTEXT_VERSION([0.18.1])/' \
|
sed -i 's/AM_GNU_GETTEXT_VERSION.*/AM_GNU_GETTEXT_VERSION([0.18.1])/' \
|
||||||
@ -171,13 +173,13 @@ autoreconf -fiv
|
|||||||
--with-fontdir=%{_datadir}/X11/fonts \
|
--with-fontdir=%{_datadir}/X11/fonts \
|
||||||
--with-xkb-output=%{_localstatedir}/lib/xkb \
|
--with-xkb-output=%{_localstatedir}/lib/xkb \
|
||||||
--enable-install-libxf86config \
|
--enable-install-libxf86config \
|
||||||
--disable-dri2 \
|
--enable-glx --disable-dri --enable-dri2 \
|
||||||
--enable-glx \
|
|
||||||
--disable-config-dbus \
|
--disable-config-dbus \
|
||||||
--disable-config-hal \
|
--disable-config-hal \
|
||||||
--disable-config-udev \
|
--disable-config-udev \
|
||||||
--with-dri-driver-path=%{_libdir}/dri \
|
--with-dri-driver-path=%{_libdir}/dri \
|
||||||
--without-dtrace
|
--without-dtrace \
|
||||||
|
--disable-unit-tests
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
@ -307,6 +309,9 @@ fi
|
|||||||
%doc LICENCE.TXT
|
%doc LICENCE.TXT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 12 2011 Adam Tkac <atkac redhat com> - 1.0.90-5
|
||||||
|
- make Xvnc buildable against X.Org 1.11
|
||||||
|
|
||||||
* Tue May 10 2011 Adam Tkac <atkac redhat com> - 1.0.90-4
|
* Tue May 10 2011 Adam Tkac <atkac redhat com> - 1.0.90-4
|
||||||
- viewer can send password without proper validation of X.509 certs
|
- viewer can send password without proper validation of X.509 certs
|
||||||
(CVE-2011-1775)
|
(CVE-2011-1775)
|
||||||
|
95
tigervnc11-xorg111.patch
Normal file
95
tigervnc11-xorg111.patch
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
diff -up tigervnc-1.0.90/unix/xserver/hw/vnc/Input.cc.xorg111 tigervnc-1.0.90/unix/xserver/hw/vnc/Input.cc
|
||||||
|
--- tigervnc-1.0.90/unix/xserver/hw/vnc/Input.cc.xorg111 2011-05-12 10:42:52.813229993 +0200
|
||||||
|
+++ tigervnc-1.0.90/unix/xserver/hw/vnc/Input.cc 2011-05-12 10:52:41.036211939 +0200
|
||||||
|
@@ -305,7 +305,7 @@ static inline void pressKey(DeviceIntPtr
|
||||||
|
vlog.debug("%s %d %s", msg, kc, down ? "down" : "up");
|
||||||
|
|
||||||
|
action = down ? KeyPress : KeyRelease;
|
||||||
|
- n = GetKeyboardEvents(eventq, dev, action, kc);
|
||||||
|
+ n = GetKeyboardEvents(eventq, dev, action, kc, NULL);
|
||||||
|
enqueueEvents(dev, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -341,8 +341,11 @@ public:
|
||||||
|
int state, maxKeysPerMod, keycode;
|
||||||
|
#if XORG >= 17
|
||||||
|
KeyCode *modmap = NULL;
|
||||||
|
+ DeviceIntPtr master;
|
||||||
|
|
||||||
|
- state = XkbStateFieldFromRec(&dev->u.master->key->xkbInfo->state);
|
||||||
|
+ master = GetMaster(dev, MASTER_KEYBOARD);
|
||||||
|
+
|
||||||
|
+ state = XkbStateFieldFromRec(&master->key->xkbInfo->state);
|
||||||
|
#else
|
||||||
|
KeyClassPtr keyc = dev->key;
|
||||||
|
state = keyc->state;
|
||||||
|
@@ -379,8 +382,10 @@ public:
|
||||||
|
KeyClassPtr keyc;
|
||||||
|
#if XORG >= 17
|
||||||
|
KeyCode *modmap = NULL;
|
||||||
|
+ DeviceIntPtr master;
|
||||||
|
|
||||||
|
- keyc = dev->u.master->key;
|
||||||
|
+ master = GetMaster(dev, MASTER_KEYBOARD);
|
||||||
|
+ keyc = master->key;
|
||||||
|
state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
|
||||||
|
#else
|
||||||
|
keyc = dev->key;
|
||||||
|
@@ -565,9 +570,7 @@ static inline int isModifier(KeySymsPtr
|
||||||
|
|
||||||
|
void InputDevice::keyEvent(rdr::U32 keysym, bool down)
|
||||||
|
{
|
||||||
|
-#if XORG < 17
|
||||||
|
DeviceIntPtr master;
|
||||||
|
-#endif
|
||||||
|
KeyClassPtr keyc;
|
||||||
|
KeySymsPtr keymap = NULL;
|
||||||
|
KeySym *map = NULL;
|
||||||
|
@@ -596,7 +599,8 @@ void InputDevice::keyEvent(rdr::U32 keys
|
||||||
|
}
|
||||||
|
|
||||||
|
#if XORG >= 17
|
||||||
|
- keyc = keyboardDev->u.master->key;
|
||||||
|
+ master = GetMaster(keyboardDev, MASTER_KEYBOARD);
|
||||||
|
+ keyc = master->key;
|
||||||
|
|
||||||
|
keymap = XkbGetCoreMap(keyboardDev);
|
||||||
|
if (!keymap) {
|
||||||
|
@@ -753,7 +757,7 @@ ModeSwitchFound:
|
||||||
|
XkbApplyMappingChange(keyboardDev, keymap, minKeyCode,
|
||||||
|
maxKeyCode - minKeyCode + 1,
|
||||||
|
NULL, serverClient);
|
||||||
|
- XkbCopyDeviceKeymap(keyboardDev->u.master, keyboardDev);
|
||||||
|
+ XkbCopyDeviceKeymap(master, keyboardDev);
|
||||||
|
#endif /* XORG < 17 */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
diff -up tigervnc-1.0.90/unix/xserver/hw/vnc/xorg-version.h.xorg111 tigervnc-1.0.90/unix/xserver/hw/vnc/xorg-version.h
|
||||||
|
--- tigervnc-1.0.90/unix/xserver/hw/vnc/xorg-version.h.xorg111 2011-05-12 10:40:34.109227333 +0200
|
||||||
|
+++ tigervnc-1.0.90/unix/xserver/hw/vnc/xorg-version.h 2011-05-12 10:41:10.970229530 +0200
|
||||||
|
@@ -36,6 +36,8 @@
|
||||||
|
#define XORG 19
|
||||||
|
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (10 * 100000) + (99 * 1000))
|
||||||
|
#define XORG 110
|
||||||
|
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
|
||||||
|
+#define XORG 111
|
||||||
|
#else
|
||||||
|
#error "X.Org newer than 1.10 is not supported"
|
||||||
|
#endif
|
||||||
|
diff -up tigervnc-1.0.90/unix/xserver/hw/vnc/xvnc.cc.xorg111 tigervnc-1.0.90/unix/xserver/hw/vnc/xvnc.cc
|
||||||
|
--- tigervnc-1.0.90/unix/xserver/hw/vnc/xvnc.cc.xorg111 2011-05-12 10:54:21.068235787 +0200
|
||||||
|
+++ tigervnc-1.0.90/unix/xserver/hw/vnc/xvnc.cc 2011-05-12 10:59:01.867225478 +0200
|
||||||
|
@@ -670,8 +670,13 @@ vfbUninstallColormap(ColormapPtr pmap)
|
||||||
|
{
|
||||||
|
if (pmap->mid != pmap->pScreen->defColormap)
|
||||||
|
{
|
||||||
|
+#if XORG < 111
|
||||||
|
curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
|
||||||
|
RT_COLORMAP);
|
||||||
|
+#else
|
||||||
|
+ dixLookupResourceByType((pointer *) &curpmap, pmap->pScreen->defColormap,
|
||||||
|
+ RT_COLORMAP, serverClient, DixUnknownAccess);
|
||||||
|
+#endif
|
||||||
|
(*pmap->pScreen->InstallColormap)(curpmap);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user