summaryrefslogtreecommitdiff
path: root/bus/signals.c
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2014-02-13 13:17:23 -0600
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-18 18:59:46 +0000
commit66979aae614eef97a30a9cad1ab4c77f277b63f4 (patch)
treec250163990c366458787a3b10407693afd85c069 /bus/signals.c
parentd9a2fdb96adf18d6876406a6cd4335b802d66af7 (diff)
downloaddbus-66979aae614eef97a30a9cad1ab4c77f277b63f4.tar.gz
Mediation of processes eavesdropping
When an AppArmor confined process wants to eavesdrop on a bus, a check is performed to see if the action should be allowed. The check is based on the connection's label and the bus type. This patch adds a new hook, which was not previously included in the SELinux mediation, to mediate eavesdropping from bus_driver_handle_add_match(). A new function is added to bus/signals.c to see if a match rule is an eavesdropping rule since the rule flags field is private to signals.c. An example AppArmor rule that would allow a process to eavesdrop on the session bus would be: dbus eavesdrop bus=session, Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113 Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'bus/signals.c')
-rw-r--r--bus/signals.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bus/signals.c b/bus/signals.c
index 4390028f..260dd243 100644
--- a/bus/signals.c
+++ b/bus/signals.c
@@ -411,6 +411,15 @@ bus_match_rule_set_client_is_eavesdropping (BusMatchRule *rule,
}
dbus_bool_t
+bus_match_rule_get_client_is_eavesdropping (BusMatchRule *rule)
+{
+ if (rule->flags & BUS_MATCH_CLIENT_IS_EAVESDROPPING)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+dbus_bool_t
bus_match_rule_set_path (BusMatchRule *rule,
const char *path,
dbus_bool_t is_namespace)