Fri, 03 Aug 2012 20:11:53 +0200
Neutralize buggy code causing OpenPKG to have 'fatal problems' in
spite of correct installation, configuration, and operation. An
administrator suffering from this failure is even unable to
uninstall the flawed software.
michael@12 | 1 | Index: dbus/dbus-internals.c |
michael@12 | 2 | --- dbus/dbus-internals.c.orig 2006-11-17 20:12:18 +0100 |
michael@12 | 3 | +++ dbus/dbus-internals.c 2006-11-18 12:35:56 +0100 |
michael@76 | 4 | @@ -516,6 +516,14 @@ |
michael@12 | 5 | uuid->as_uint32s[DBUS_UUID_LENGTH_WORDS - 1] = DBUS_UINT32_TO_BE (now); |
michael@12 | 6 | |
michael@12 | 7 | _dbus_generate_random_bytes_buffer (uuid->as_bytes, DBUS_UUID_LENGTH_BYTES - 4); |
michael@12 | 8 | + |
michael@12 | 9 | + /* brand UUID as variant DCE 1.1 */ |
michael@12 | 10 | + uuid->as_bytes[8] &= ~0xc0; |
michael@12 | 11 | + uuid->as_bytes[8] |= (0x02 << 6); |
michael@12 | 12 | + |
michael@12 | 13 | + /* brand UUID as version 4 */ |
michael@12 | 14 | + uuid->as_bytes[6] &= ~0xf0; |
michael@12 | 15 | + uuid->as_bytes[6] |= (0x04 << 4); |
michael@12 | 16 | } |
michael@12 | 17 | |
michael@12 | 18 | /** |
michael@12 | 19 | Index: dbus/dbus-sysdeps-util-unix.c |
michael@12 | 20 | --- dbus/dbus-sysdeps-util-unix.c.orig 2006-11-02 20:19:08 +0100 |
michael@12 | 21 | +++ dbus/dbus-sysdeps-util-unix.c 2006-11-18 12:33:22 +0100 |
michael@12 | 22 | @@ -31,6 +31,7 @@ |
michael@12 | 23 | #include "dbus-test.h" |
michael@12 | 24 | |
michael@12 | 25 | #include <sys/types.h> |
michael@12 | 26 | +#include <sys/param.h> |
michael@12 | 27 | #include <stdlib.h> |
michael@12 | 28 | #include <string.h> |
michael@12 | 29 | #include <signal.h> |
michael@76 | 30 | @@ -728,6 +729,8 @@ |
michael@12 | 31 | # else |
michael@12 | 32 | # if defined(NAME_MAX) |
michael@12 | 33 | name_max = NAME_MAX; |
michael@12 | 34 | +# elif defined(MAXPATHLEN) |
michael@12 | 35 | + name_max = MAXPATHLEN; |
michael@12 | 36 | # else |
michael@12 | 37 | # error "buffer size for readdir_r cannot be determined" |
michael@12 | 38 | # endif |
michael@76 | 39 | @@ -1233,4 +1236,4 @@ |
michael@76 | 40 | _dbus_string_free (&cmdline); |
michael@76 | 41 | _dbus_string_free (&path); |
michael@76 | 42 | return FALSE; |
michael@76 | 43 | -} |
michael@76 | 44 | \ No newline at end of file |
michael@76 | 45 | +} |
michael@76 | 46 | Index: bus/config-parser-trivial.c |
michael@76 | 47 | --- bus/config-parser-trivial.c.orig 2009-01-13 16:12:32.838078473 +0100 |
michael@76 | 48 | +++ bus/config-parser-trivial.c 2009-01-13 16:11:58.375810360 +0100 |
michael@76 | 49 | @@ -131,6 +131,25 @@ |
michael@76 | 50 | } |
michael@76 | 51 | |
michael@76 | 52 | dbus_bool_t |
michael@76 | 53 | +bus_config_parser_check_doctype (BusConfigParser *parser, |
michael@76 | 54 | + const char *doctype, |
michael@76 | 55 | + DBusError *error) |
michael@76 | 56 | +{ |
michael@76 | 57 | + _DBUS_ASSERT_ERROR_IS_CLEAR (error); |
michael@76 | 58 | + |
michael@76 | 59 | + if (strcmp (doctype, "busconfig") != 0) |
michael@76 | 60 | + { |
michael@76 | 61 | + dbus_set_error (error, |
michael@76 | 62 | + DBUS_ERROR_FAILED, |
michael@76 | 63 | + "Configuration file has the wrong document type %s", |
michael@76 | 64 | + doctype); |
michael@76 | 65 | + return FALSE; |
michael@76 | 66 | + } |
michael@76 | 67 | + else |
michael@76 | 68 | + return TRUE; |
michael@76 | 69 | +} |
michael@76 | 70 | + |
michael@76 | 71 | +dbus_bool_t |
michael@76 | 72 | bus_config_parser_start_element (BusConfigParser *parser, |
michael@76 | 73 | const char *element_name, |
michael@76 | 74 | const char **attribute_names, |