[PATCH] Re: HAL Crasher

Danny Kukawka danny.kukawka at web.de
Thu Mar 15 14:07:53 PDT 2007


On Donnerstag, 15. März 2007, Andrey Borzenkov wrote:
> How is it related to D-Bus? Getting D-Bus-categorized errors from callouts on 
> stderr is HAL convention. There is nothing inherent to D-Bus.

You are right, I spuriously assumed the dbus_message_new_error() call would kill 
HAL because we had such problems in the past with other functions.

Attached a patch to validate the error name and workaround the problem in HAL.
Because there is no funtion in the D-Bus libraries to check if a interface or
error name is valid, I adapted the D-Bus internal funtion for util.h. If the 
check fail and the error name is not valid the patch set the error name to:

	org.freedesktop.Hal.Device.UnknownError

The invalid error name get prepend to the error message to avoid lost information.

Maybe we should change the error name to: 

	org.freedesktop.Hal.Device.MalformedError

Danny

 hald_dbus.c |    5 ++++
 util.c      |   61 ++++++++++++++++++++++++++++++++++++++++++++++++++
 util.h      |    2 +
 3 files changed, 68 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-validate_error_name.diff
Type: text/x-diff
Size: 2923 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070315/52ea02e9/hal-validate_error_name.bin


More information about the hal mailing list