diff options
Diffstat (limited to 'sysutils/dbus/patches/patch-ah')
-rw-r--r-- | sysutils/dbus/patches/patch-ah | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/sysutils/dbus/patches/patch-ah b/sysutils/dbus/patches/patch-ah deleted file mode 100644 index a180258b98a..00000000000 --- a/sysutils/dbus/patches/patch-ah +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-ah,v 1.1 2008/03/02 13:21:07 drochner Exp $ - ---- bus/policy.c.orig 2006-12-11 20:21:22.000000000 +0100 -+++ bus/policy.c -@@ -931,9 +931,19 @@ bus_client_policy_check_can_send (BusCli - - if (rule->d.send.interface != NULL) - { -- if (dbus_message_get_interface (message) != NULL && -- strcmp (dbus_message_get_interface (message), -- rule->d.send.interface) != 0) -+ /* The interface is optional in messages. For allow rules, if the message -+ * has no interface we want to skip the rule (and thus not allow); -+ * for deny rules, if the message has no interface we want to use the -+ * rule (and thus deny). -+ */ -+ dbus_bool_t no_interface; -+ -+ no_interface = dbus_message_get_interface (message) == NULL; -+ -+ if ((no_interface && rule->allow) || -+ (!no_interface && -+ strcmp (dbus_message_get_interface (message), -+ rule->d.send.interface) != 0)) - { - _dbus_verbose (" (policy) skipping rule for different interface\n"); - continue; -@@ -1117,9 +1127,19 @@ bus_client_policy_check_can_receive (Bus - - if (rule->d.receive.interface != NULL) - { -- if (dbus_message_get_interface (message) != NULL && -- strcmp (dbus_message_get_interface (message), -- rule->d.receive.interface) != 0) -+ /* The interface is optional in messages. For allow rules, if the message -+ * has no interface we want to skip the rule (and thus not allow); -+ * for deny rules, if the message has no interface we want to use the -+ * rule (and thus deny). -+ */ -+ dbus_bool_t no_interface; -+ -+ no_interface = dbus_message_get_interface (message) == NULL; -+ -+ if ((no_interface && rule->allow) || -+ (!no_interface && -+ strcmp (dbus_message_get_interface (message), -+ rule->d.receive.interface) != 0)) - { - _dbus_verbose (" (policy) skipping rule for different interface\n"); - continue; |