diff options
author | sanghyeok.oh <sanghyeok.oh@samsung.com> | 2017-07-18 17:28:16 +0900 |
---|---|---|
committer | sanghyeok.oh <sanghyeok.oh@samsung.com> | 2017-07-18 17:42:42 +0900 |
commit | 59aae7b82d79848f2f188f8b9bfa15d29cd6addc (patch) | |
tree | 5c5543ad8d67386e76db1a0d1ab151ba4009d329 | |
parent | dd656a50dc3ac0e284888d61caff367d1db20a67 (diff) | |
download | dbus-59aae7b82d79848f2f188f8b9bfa15d29cd6addc.tar.gz dbus-59aae7b82d79848f2f188f8b9bfa15d29cd6addc.tar.bz2 dbus-59aae7b82d79848f2f188f8b9bfa15d29cd6addc.zip |
kdbus: check policy only for method call or unicast signalsubmit/tizen_4.0/20170811.094300submit/tizen/20170725.023005submit/tizen/20170719.103604accepted/tizen/unified/20170727.190334accepted/tizen/4.0/unified/20170816.012441
Otherwise just send it. It will checked by receiver.
Change-Id: I9652f7548adf9605111d28cdc236f36fbe319c97
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
-rwxr-xr-x | dbus/dbus-transport-kdbus.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index c3630427..0683db5d 100755 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -675,16 +675,22 @@ can_send (DBusTransportKdbus *transport, * Otherwise - check the policy. */ if (0 == reply_serial) - ret = dbuspolicy1_check_out (transport->policy, - dbus_message_get_destination (message), - transport->my_DBus_unique_name, - dbus_message_get_path (message), - dbus_message_get_interface (message), - dbus_message_get_member (message), - dbus_message_get_type (message), - dbus_message_get_error_name (message), - reply_serial, - !dbus_message_get_no_reply (message)); + { + /* If method call or unicast signal, check policy */ + if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_CALL || + (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL && + dbus_message_get_destination (message) != NULL)) + ret = dbuspolicy1_check_out (transport->policy, + dbus_message_get_destination (message), + transport->my_DBus_unique_name, + dbus_message_get_path (message), + dbus_message_get_interface (message), + dbus_message_get_member (message), + dbus_message_get_type (message), + dbus_message_get_error_name (message), + reply_serial, + !dbus_message_get_no_reply (message)); + } } return ret; |