diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index e45859a..410f3d3 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -19,7 +19,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.6.1.901 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -111,6 +111,10 @@ Patch6040: xserver-1.6.1-vt-switch.patch # from upstream, nominated for 1.6.2 (#499792) Patch6041: xserver-1.6.1-synaptics.patch Patch6042: xserver-1.6.1-proc-cmdline.patch +# second part to xserver-1.6.1-synaptics.patch +Patch6043: xserver-1.6.1-mousedrivers.patch +# #456376, patch from upstream +Patch6044: xserver-1.6.1-xkbsendmap.patch %define moduledir %{_libdir}/xorg/modules %define drimoduledir %{_libdir}/dri @@ -528,6 +532,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 25 2009 Peter Hutterer 1.6.1.901-2 +- xserver-1.6.1-mousedrivers.patch: treat other drivers as mouse drivers too + when parsing the config file (complements xserver-1.6.1-synaptics.patch) +- xserver-1.6.1-xkbsendmap.patch: Fix crash due to uninitialized VModMap fields. + * Mon May 18 2009 Adam Jackson 1.6.1.901-1 - Rebase to 1.6.2 pre-release - xserver-1.6.1-hush-warning.patch: Silence the prerelease warning spew. diff --git a/xserver-1.6.1-mousedrivers.patch b/xserver-1.6.1-mousedrivers.patch new file mode 100644 index 0000000..f3cce45 --- /dev/null +++ b/xserver-1.6.1-mousedrivers.patch @@ -0,0 +1,89 @@ +From eb699604d34e4564dde221e0fc28eb6559969b4f Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 15 May 2009 08:33:07 +1000 +Subject: [PATCH] xfree86: treat other drivers as mouse drivers in the config. + +Historically, if no input device was referenced in the ServerLayout, +the server would pick the first "mouse" device found in the xorg.conf. +This patch gives evdev, synaptics, vmmouse and void the same status. If +there is a section in the config file using this driver - use it as the core +pointer. + +Device selection is in driver-order, not in config-order. If a "mouse" +device is listed after a "synaptics" device, the "mouse" device gets +preference. This replicates the original behaviour. + +This code only takes effect if AllowEmptyInput is off and there is no core +pointer in the server layout. + +Red Hat Bug 499792 + +Signed-off-by: Peter Hutterer +--- + hw/xfree86/common/xf86Config.c | 25 ++++++++++++++++--------- + 1 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c +index 2ecb639..844e04a 100644 +--- a/hw/xfree86/common/xf86Config.c ++++ b/hw/xfree86/common/xf86Config.c +@@ -1091,8 +1091,8 @@ Bool xf86DRI2Enabled(void) + * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by + * the active ServerLayout. + * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard". +- * 4. The first InputDevices that use the 'mouse' and 'keyboard' or 'kbd' +- * drivers. ++ * 4. The first InputDevices that use 'keyboard' or 'kbd' and a valid mouse ++ * driver (mouse, synaptics, evdev, vmmouse, void) + * 5. Default devices with an empty (default) configuration. These defaults + * will reference the 'mouse' and 'keyboard' drivers. + */ +@@ -1111,6 +1111,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) + int count = 0; + MessageType from = X_DEFAULT; + int found = 0; ++ const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse", ++ "void", NULL }; + + /* + * First check if a core pointer or core keyboard have been specified +@@ -1220,13 +1222,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) + } + } + +- /* 4. First pointer with 'mouse' as the driver. */ ++ /* 4. First pointer with an allowed mouse driver. */ + if (!foundPointer && !xf86Info.allowEmptyInput) { ++ const char **driver = mousedrivers; + confInput = xf86findInput(CONF_IMPLICIT_POINTER, + xf86configptr->conf_input_lst); +- if (!confInput) { +- confInput = xf86findInputByDriver("mouse", ++ while (driver && !confInput) { ++ confInput = xf86findInputByDriver(*driver, + xf86configptr->conf_input_lst); ++ driver++; + } + if (confInput) { + foundPointer = TRUE; +@@ -1281,10 +1285,13 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) + * section ... deal. + */ + for (devs = servlayoutp->inputs; devs && *devs; devs++) { +- if (!strcmp((*devs)->driver, "void") || !strcmp((*devs)->driver, "mouse") || +- !strcmp((*devs)->driver, "vmmouse") || !strcmp((*devs)->driver, "evdev") || +- !strcmp((*devs)->driver, "synaptics")) { +- found = 1; break; ++ const char **driver = mousedrivers; ++ while(*driver) { ++ if (!strcmp((*devs)->driver, *driver)) { ++ found = 1; ++ break; ++ } ++ driver++; + } + } + if (!found && !xf86Info.allowEmptyInput) { +-- +1.6.3.rc1.2.g0164.dirty + diff --git a/xserver-1.6.1-xkbsendmap.patch b/xserver-1.6.1-xkbsendmap.patch new file mode 100644 index 0000000..b5037bd --- /dev/null +++ b/xserver-1.6.1-xkbsendmap.patch @@ -0,0 +1,63 @@ +From 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20 Mon Sep 17 00:00:00 2001 +From: Tomas Janousek +Date: Wed, 20 May 2009 15:03:01 +0200 +Subject: [PATCH] Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. + +In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and +.totalVModMapKeys were not initialized, contained random values and caused +accesses to unallocated and later modified memory, causing +XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of +nonzero values, resulting in writes past the end of an array in XkbSendMap. + +This patch initializes those values sensibly and reverts commits 5c0a2088 and +6dd4fc46, which have been plain non-sense. + +Signed-off-by: Tomas Janousek +Signed-off-by: Peter Hutterer +--- + xkb/xkb.c | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/xkb/xkb.c b/xkb/xkb.c +index 445c55f..ec46238 100644 +--- a/xkb/xkb.c ++++ b/xkb/xkb.c +@@ -1308,7 +1308,7 @@ XkbSizeVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep) + rep->totalVModMapKeys= 0; + return 0; + } +- for (nRtrn=i=0;inVModMapKeys-1;i++) { ++ for (nRtrn=i=0;inVModMapKeys;i++) { + if (xkb->server->vmodmap[i+rep->firstVModMapKey]!=0) + nRtrn++; + } +@@ -1327,7 +1327,7 @@ unsigned short * pMap; + + wire= (xkbVModMapWireDesc *)buf; + pMap= &xkb->server->vmodmap[rep->firstVModMapKey]; +- for (i=0;inVModMapKeys-1;i++,pMap++) { ++ for (i=0;inVModMapKeys;i++,pMap++) { + if (*pMap!=0) { + wire->key= i+rep->firstVModMapKey; + wire->vmods= *pMap; +@@ -5670,7 +5670,7 @@ ProcXkbGetKbdByName(ClientPtr client) + mrep.present = 0; + mrep.totalSyms = mrep.totalActs = + mrep.totalKeyBehaviors= mrep.totalKeyExplicit= +- mrep.totalModMapKeys= 0; ++ mrep.totalModMapKeys= mrep.totalVModMapKeys= 0; + if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) { + mrep.present|= XkbKeyTypesMask; + mrep.firstType = 0; +@@ -5696,6 +5696,8 @@ ProcXkbGetKbdByName(ClientPtr client) + mrep.firstKeyExplicit = new->min_key_code; + mrep.nKeyActs = mrep.nKeyBehaviors = + mrep.nKeyExplicit = XkbNumKeys(new); ++ mrep.firstVModMapKey= new->min_key_code; ++ mrep.nVModMapKeys= XkbNumKeys(new); + } + else { + mrep.virtualMods= 0; +-- +1.6.3.rc1.2.g0164.dirty +