xorg-server: Changes to 'ubuntu'
debian/changelog | 15 ++
debian/patches/131_remove_open-coded_strcasestr.patch | 43 +++++++
debian/patches/132_add_parsing_for_xkb.options.patch | 68 ++++++++++++
debian/patches/133_support_strlist_for_xkboptions.patch | 88 ++++++++++++++++
debian/patches/134_protect_against_out_of_bounds.patch | 45 ++++++++
debian/patches/series | 4
6 files changed, 260 insertions(+), 3 deletions(-)
New commits:
commit 0a73fc357c012e13f65e75433700040b57498ace
Author: Timo Aaltonen <tjaalton@cc.hut.fi>
Date: Tue Aug 5 01:53:46 2008 +0300
Squeeze a couple of patches in before uploading:
131_remove_open-coded_strcasestr.patch
132_add_parsing_for_xkb.options.patch
133_support_strlist_for_xkboptions.patch
134_protect_against_out_of_bounds.patch
diff --git a/debian/changelog b/debian/changelog
index 3689bb9..72b616a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,8 +7,17 @@ xorg-server (2:1.4.99.906-1ubuntu1) intrepid; urgency=low
* Add 130_fedora_call_switchcorekeyboard.patch, a hack to fix fd.o bug
#16364. Breaks if the first hotplugged keyboard is not the wanted
keyboard.
-
- -- Timo Aaltonen <tepsipakki@ubuntu.com> Tue, 05 Aug 2008 00:07:38 +0300
+ * Patches from upstream master:
+ 131_remove_open-coded_strcasestr.patch
+ - pre-requisite for the rest
+ 132_add_parsing_for_xkb.options.patch
+ - parsing xkb.options didn't work (fd.o #16874)
+ 133_support_strlist_for_xkboptions.patch
+ - allow using a list for xkb.options like before.
+ 134_protect_against_out_of_bounds.patch
+ - protect against potential out-of-bounds indexing.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Tue, 05 Aug 2008 01:49:42 +0300
xorg-server (2:1.4.99.906-1) experimental; urgency=low
diff --git a/debian/patches/131_remove_open-coded_strcasestr.patch b/debian/patches/131_remove_open-coded_strcasestr.patch
new file mode 100644
index 0000000..30e7c44
--- /dev/null
+++ b/debian/patches/131_remove_open-coded_strcasestr.patch
@@ -0,0 +1,43 @@
+From: Daniel Stone <daniel@fooishbar.org>
+Date: Wed, 16 Jul 2008 00:00:25 +0000 (+0300)
+Subject: HAL: Remove grotesque open-coded strcasestr
+X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=b8dd07f855c555af56cbf0f69df799f424da2cca
+
+HAL: Remove grotesque open-coded strcasestr
+
+Not only was this pretty ugly, but it didn't even work on systems
+without strcasestr anyway, due to the define not being in dix-config.h.
+Lack of strcasestr is handled transparently with the version from
+FreeBSD now anyway, so, huzzah.
+---
+
+--- a/config/hal.c
++++ b/config/hal.c
+@@ -262,17 +262,7 @@ device_added(LibHalContext *hal_ctx, con
+ * Since we can't predict the order in which the keys
+ * arrive, we need to store them.
+ */
+-#ifndef HAVE_STRCASESTR
+- int psi_key_len = strlen(psi_key);
+- char *lower_psi_key = xalloc(psi_key_len + 1);
+-
+- CopyISOLatin1Lowered((unsigned char *) lower_psi_key,
+- (unsigned char *) psi_key,
+- psi_key_len);
+- if ((tmp = strstr(lower_psi_key, "xkb")))
+-#else
+ if ((tmp = strcasestr(psi_key, "xkb")))
+-#endif
+ {
+ if (!strcasecmp(&tmp[3], "layout"))
+ {
+@@ -301,9 +291,6 @@ device_added(LibHalContext *hal_ctx, con
+ add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
+ xfree(tmp_val);
+ }
+-#ifndef HAVE_STRCASESTR
+- xfree(lower_psi_key);
+-#endif
+ }
+ } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
+
diff --git a/debian/patches/132_add_parsing_for_xkb.options.patch b/debian/patches/132_add_parsing_for_xkb.options.patch
new file mode 100644
index 0000000..f5b96ca
--- /dev/null
+++ b/debian/patches/132_add_parsing_for_xkb.options.patch
@@ -0,0 +1,68 @@
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 29 Jul 2008 03:29:57 +0000 (+0930)
+Subject: config: add parsing for input.x11_options.XkbOptions. #16874
+X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=35b14519b4a3158592a089170ec039bbc219603e
+
+config: add parsing for input.x11_options.XkbOptions. #16874
+
+X.Org Bug 16874 <http://bugs.freedesktop.org/show_bug.cgi?id=16784>
+---
+
+--- a/config/hal.c
++++ b/config/hal.c
+@@ -1,5 +1,6 @@
+ /*
+ * Copyright © 2007 Daniel Stone
++ * Copyright © 2007 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+@@ -54,6 +55,7 @@ struct xkb_options {
+ char* model;
+ char* rules;
+ char* variant;
++ char* options;
+ };
+
+
+@@ -284,6 +286,11 @@ device_added(LibHalContext *hal_ctx, con
+ if (xkb_opts.variant)
+ xfree(xkb_opts.variant);
+ xkb_opts.variant = strdup(tmp_val);
++ } else if (!strcasecmp(&tmp[3], "options"))
++ {
++ if (xkb_opts.options)
++ xfree(xkb_opts.options);
++ xkb_opts.options = strdup(tmp_val);
+ }
+ } else
+ {
+@@ -318,6 +325,10 @@ device_added(LibHalContext *hal_ctx, con
+ {
+ if (!xkb_opts.model)
+ xkb_opts.model = strdup(tmp_val);
++ } else if (!strcasecmp(tmp, "options"))
++ {
++ if (!xkb_opts.options)
++ xkb_opts.options = strdup(tmp_val);
+ }
+ xfree(tmp_val);
+ }
+@@ -338,6 +349,8 @@ device_added(LibHalContext *hal_ctx, con
+ add_option(&options, "xkb_variant", xkb_opts.variant);
+ if (xkb_opts.model)
+ add_option(&options, "xkb_model", xkb_opts.model);
++ if (xkb_opts.options)
++ add_option(&options, "xkb_options", xkb_opts.options);
+
+ /* this isn't an error, but how else do you output something that the user can see? */
+ LogMessage(X_INFO, "config/hal: Adding input device %s\n", name);
+@@ -379,6 +392,8 @@ unwind:
+ xfree(xkb_opts.model);
+ if (xkb_opts.variant)
+ xfree(xkb_opts.variant);
++ if (xkb_opts.options)
++ xfree(xkb_opts.options);
+
+ dbus_error_free(&error);
+
diff --git a/debian/patches/133_support_strlist_for_xkboptions.patch b/debian/patches/133_support_strlist_for_xkboptions.patch
new file mode 100644
index 0000000..7c090d7
--- /dev/null
+++ b/debian/patches/133_support_strlist_for_xkboptions.patch
@@ -0,0 +1,88 @@
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 1 Aug 2008 04:54:54 +0000 (+0930)
+Subject: config: support type strlist for XkbOptions property.
+X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=92c51b183c2ff06361dad7f918daed6577ba4935
+
+config: support type strlist for XkbOptions property.
+
+For backwards compatibility with server 1.4.
+---
+
+--- a/config/hal.c
++++ b/config/hal.c
+@@ -132,9 +132,6 @@ get_prop_string(LibHalContext *hal_ctx,
+ return ret;
+ }
+
+-/* this function is no longer used... keep it here in case its needed in
+- * the future. */
+-#if 0
+ static char *
+ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
+ {
+@@ -168,7 +165,6 @@ get_prop_string_array(LibHalContext *hal
+
+ return ret;
+ }
+-#endif
+
+ static void
+ device_added(LibHalContext *hal_ctx, const char *udi)
+@@ -250,12 +246,12 @@ device_added(LibHalContext *hal_ctx, con
+
+ /* normal options first (input.x11_options.<propname>) */
+ if (!strncasecmp(psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY)-1)){
++ char* tmp;
+
+ /* only support strings for all values */
+ tmp_val = get_prop_string(hal_ctx, udi, psi_key);
+
+ if (tmp_val){
+- char* tmp;
+
+ /* xkb needs special handling. HAL specs include
+ * input.xkb.xyz options, but the x11-input.fdi specifies
+@@ -298,14 +294,25 @@ device_added(LibHalContext *hal_ctx, con
+ add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
+ xfree(tmp_val);
+ }
++ } else
++ {
++ /* server 1.4 had xkb_options as strlist. */
++ if ((tmp = strcasestr(psi_key, "xkb")) &&
++ (!strcasecmp(&tmp[3], "options")) &&
++ (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key)))
++ {
++ if (xkb_opts.options)
++ xfree(xkb_opts.options);
++ xkb_opts.options = strdup(tmp_val);
++ }
+ }
+ } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
++ char* tmp;
+
+ /* only support strings for all values */
+ tmp_val = get_prop_string(hal_ctx, udi, psi_key);
+
+ if (tmp_val){
+- char* tmp;
+
+ tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
+
+@@ -331,6 +338,16 @@ device_added(LibHalContext *hal_ctx, con
+ xkb_opts.options = strdup(tmp_val);
+ }
+ xfree(tmp_val);
++ } else
++ {
++ /* server 1.4 had xkb options as strlist */
++ tmp_val = get_prop_string_array(hal_ctx, udi, psi_key);
++ if (tmp_val)
++ {
++ tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
++ if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
++ xkb_opts.options = strdup(tmp_val);
++ }
+ }
+ }
+ }
diff --git a/debian/patches/134_protect_against_out_of_bounds.patch b/debian/patches/134_protect_against_out_of_bounds.patch
new file mode 100644
index 0000000..cd4a2bb
--- /dev/null
+++ b/debian/patches/134_protect_against_out_of_bounds.patch
@@ -0,0 +1,45 @@
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 1 Aug 2008 06:22:07 +0000 (+0930)
+Subject: config: protect against potential out-of-bounds indexing.
+X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=3c6a9c531f673b7a0cb9ca01860b4dbe79686363
+
+config: protect against potential out-of-bounds indexing.
+---
+
+--- a/config/hal.c
++++ b/config/hal.c
+@@ -260,7 +260,7 @@ device_added(LibHalContext *hal_ctx, con
+ * Since we can't predict the order in which the keys
+ * arrive, we need to store them.
+ */
+- if ((tmp = strcasestr(psi_key, "xkb")))
++ if ((tmp = strcasestr(psi_key, "xkb")) && strlen(tmp) >= 4)
+ {
+ if (!strcasecmp(&tmp[3], "layout"))
+ {
+@@ -298,6 +298,7 @@ device_added(LibHalContext *hal_ctx, con
+ {
+ /* server 1.4 had xkb_options as strlist. */
+ if ((tmp = strcasestr(psi_key, "xkb")) &&
++ (strlen(tmp) >= 4) &&
+ (!strcasecmp(&tmp[3], "options")) &&
+ (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key)))
+ {
+@@ -312,7 +313,7 @@ device_added(LibHalContext *hal_ctx, con
+ /* only support strings for all values */
+ tmp_val = get_prop_string(hal_ctx, udi, psi_key);
+
+- if (tmp_val){
++ if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY)) {
+
+ tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
+
+@@ -342,7 +343,7 @@ device_added(LibHalContext *hal_ctx, con
+ {
+ /* server 1.4 had xkb options as strlist */
+ tmp_val = get_prop_string_array(hal_ctx, udi, psi_key);
+- if (tmp_val)
++ if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY))
+ {
+ tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1];
+ if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
diff --git a/debian/patches/series b/debian/patches/series
index a789a8f..41fac00 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,7 @@
121_only_switch_vt_when_active.diff
123_no_composite_for_xvfb_run.patch
130_fedora_call_switchcorekeyboard.patch
+131_remove_open-coded_strcasestr.patch
+132_add_parsing_for_xkb.options.patch
+133_support_strlist_for_xkboptions.patch
+134_protect_against_out_of_bounds.patch
commit aa02af9a2391fde8b0d6305035632f72c927bd78
Author: Timo Aaltonen <tjaalton@cc.hut.fi>
Date: Tue Aug 5 00:07:58 2008 +0300
Update the changelog and release
diff --git a/debian/changelog b/debian/changelog
index c9c37f5..3689bb9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.4.99.906-1ubuntu1) UNRELEASED; urgency=low
+xorg-server (2:1.4.99.906-1ubuntu1) intrepid; urgency=low
* Merge with debian experimental, 1.5RC6 (LP: #247120, #253021)
* Drop 120_fedora_xserver-xaa-evict-pixmaps.patch, because offscreen
@@ -8,7 +8,7 @@ xorg-server (2:1.4.99.906-1ubuntu1) UNRELEASED; urgency=low
#16364. Breaks if the first hotplugged keyboard is not the wanted
keyboard.
- -- Timo Aaltonen <tepsipakki@ubuntu.com> Mon, 04 Aug 2008 23:23:08 +0300
+ -- Timo Aaltonen <tepsipakki@ubuntu.com> Tue, 05 Aug 2008 00:07:38 +0300
xorg-server (2:1.4.99.906-1) experimental; urgency=low
Reply to: