diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2010-05-19 08:58:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:43:05 +0200 |
commit | b76270bf9e6dd375e495fec92140a79a79415d27 (patch) | |
tree | 3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/l/hal/patches/fixup_udi_strings.diff | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.xz |
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits. The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription. Consider picking up
a copy to help support the project. Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality. :-)
Enjoy!
Diffstat (limited to 'source/l/hal/patches/fixup_udi_strings.diff')
-rw-r--r-- | source/l/hal/patches/fixup_udi_strings.diff | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/source/l/hal/patches/fixup_udi_strings.diff b/source/l/hal/patches/fixup_udi_strings.diff deleted file mode 100644 index 03549ec1d..000000000 --- a/source/l/hal/patches/fixup_udi_strings.diff +++ /dev/null @@ -1,69 +0,0 @@ -Author: Danny Kukawka <danny.kukawka@web.de> -Date: Mon Oct 13 12:55:48 2008 +0200 - - fix udi: replace '/' in the last part of the udi - - Fixed udi handling. DBus forbids a '/' after the base path - (in case of HAL: '/org/freedesktop/Hal/devices/) of a DBus - path. Replace all not allowed chars in the last part of the - UDI (everything but _a-zA-Z0-9) with a '_'. - - This fixes also fd.o#16040. - -diff --git a/hald/hald.c b/hald/hald.c -index a28d22e..051b33b 100644 ---- a/hald/hald.c -+++ b/hald/hald.c -@@ -265,6 +265,8 @@ hald_compute_udi (gchar *dst, gsize dstsize, const gchar *format, ...) - hal_util_compute_udi_valist (hald_get_gdl (), dst, dstsize, format, args); - va_end (args); - -+ hal_util_validate_udi (dst, dstsize); -+ - if (hal_device_store_find (hald_get_gdl (), dst) == NULL && - hal_device_store_find (hald_get_tdl (), dst) == NULL) - goto out; -diff --git a/hald/util.c b/hald/util.c -index 901e64f..81060e4 100644 ---- a/hald/util.c -+++ b/hald/util.c -@@ -422,6 +422,26 @@ hal_util_compute_udi (HalDeviceStore *store, gchar *dst, gsize dstsize, const gc - va_end (args); - } - -+void -+hal_util_validate_udi (gchar *udi, gsize size) { -+ -+ char end[size]; -+ -+ if (sscanf (udi, "/org/freedesktop/Hal/devices/%s", end) == 1) { -+ if (strstr(end, "/") != NULL) { -+ HAL_DEBUG (("UDI end contains invalid char '/': '%s'", udi)); -+ -+ g_strcanon (end, "_" -+ "abcdefghijklmnopqrstuvwxyz" -+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -+ "1234567890", '_'); -+ g_snprintf (udi, size, "/org/freedesktop/Hal/devices/%s", end); -+ -+ HAL_DEBUG (("Fixed UDI, replaced '/', new UDI: %s", udi)); -+ } -+ } -+} -+ - - gboolean - hal_util_path_ascend (gchar *path) -diff --git a/hald/util.h b/hald/util.h -index 510c36c..5377e35 100644 ---- a/hald/util.h -+++ b/hald/util.h -@@ -70,6 +70,8 @@ void hal_util_compute_udi_valist (HalDeviceStore *store, gchar *dst, gsize dstsi - - void hal_util_compute_udi (HalDeviceStore *store, gchar *dst, gsize dstsize, const gchar *format, ...); - -+void hal_util_validate_udi (gchar *udi, gsize size); -+ - gboolean hal_util_path_ascend (gchar *path); - - void hal_util_grep_discard_existing_data (void); |