On Sun, 04 Oct 2015 05:42:44 -0700 Carsten Haitzler
<[email protected]> wrote:

> discomfitor pushed a commit to branch efl-1.15.
> 
> http://git.enlightenment.org/core/efl.git/commit/?id=d7c27e407b0bad663891faa667d76fa5d8438b58
> 
> commit d7c27e407b0bad663891faa667d76fa5d8438b58
> Author: Carsten Haitzler (Rasterman) <[email protected]>
> Date:   Sun Oct 4 17:53:46 2015 +0900
> 
>     eldbus - make method calls less crasy since libdbus likes to abort
>     
>     changes zmike made to e's systray make e abort due to libdbus
> seeing the bus name as invalid. it actually is. it's
>     /org/ayatana/NotificationItem/steam for example - instead of
>     or.whatever.blah - thuis e aborts continually if you run steam at
> all. eldbus should be more crash-proof thus this adds checks so dbus
> fun doesnt cause an app to crash if it happens to call incorrect dbus
> names. 
>     @fix
> ---
>  src/lib/eldbus/eldbus_message.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/src/lib/eldbus/eldbus_message.c
> b/src/lib/eldbus/eldbus_message.c index 03b8d64..5b8763d 100644
> --- a/src/lib/eldbus/eldbus_message.c
> +++ b/src/lib/eldbus/eldbus_message.c
> @@ -108,6 +108,22 @@ eldbus_message_method_call_new(const char *dest,
> const char *path, const char *i EINA_SAFETY_ON_NULL_RETURN_VAL(iface,
> NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(method, NULL);
>  
> +   if (!dbus_validate_bus_name(dest, NULL))
> +     {
> +        ERR("Invalid bus name '%s'", dest);
> +        return NULL;
> +     }
> +   if (!dbus_validate_path(path, NULL))
> +     {
> +        ERR("Invalid path '%s'", path);
> +        return NULL;
> +     }
> +   if (!dbus_validate_interface(iface, NULL))
> +     {
> +        ERR("Invalid interface '%s'", iface);
> +        return NULL;
> +     }
> +
>     msg = eldbus_message_new(EINA_TRUE);
>     EINA_SAFETY_ON_NULL_GOTO(msg, fail);
>  
> 

These dbus_validate_* API where added to D-Bus 1.5.12, but I don't see
us checking for that version.  Ubuntu 12.04 LTS that I use only has
1.4.18, so EFL fails to compile for me with these new calls, despite
passing the D-Bus version check.

Maybe we could wrap these in an #if to make them more crazy for crazy
people like me that like to stick to stable Oses?

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to