summaryrefslogtreecommitdiff
path: root/dbus/dbus-watch.c
diff options
context:
space:
mode:
authorAlban Crequy <alban.crequy@collabora.co.uk>2014-07-04 15:05:51 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-09-15 12:28:37 +0100
commit8ad179a8dad789fc6a5402780044bc0ec3d41115 (patch)
treea0aa286cd837e1064acd0da5390824bec0f176f6 /dbus/dbus-watch.c
parent54d26df52b6a394bea175651d1d7ad2ab3f87dea (diff)
downloaddbus-8ad179a8dad789fc6a5402780044bc0ec3d41115.tar.gz
Stop listening on DBusServer sockets when reaching max_incomplete_connections
This addresses the parts of CVE-2014-3639 not already addressed by reducing the default authentication timeout. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80851 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80919 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'dbus/dbus-watch.c')
-rw-r--r--dbus/dbus-watch.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/dbus/dbus-watch.c b/dbus/dbus-watch.c
index b82c57d4..76a5d641 100644
--- a/dbus/dbus-watch.c
+++ b/dbus/dbus-watch.c
@@ -455,6 +455,27 @@ _dbus_watch_list_toggle_watch (DBusWatchList *watch_list,
}
/**
+ * Sets all watches to the given enabled state, invoking the
+ * application's DBusWatchToggledFunction if appropriate.
+ *
+ * @param watch_list the watch list.
+ * @param enabled #TRUE to enable
+ */
+void
+_dbus_watch_list_toggle_all_watches (DBusWatchList *watch_list,
+ dbus_bool_t enabled)
+{
+ DBusList *link;
+
+ for (link = _dbus_list_get_first_link (&watch_list->watches);
+ link != NULL;
+ link = _dbus_list_get_next_link (&watch_list->watches, link))
+ {
+ _dbus_watch_list_toggle_watch (watch_list, link->data, enabled);
+ }
+}
+
+/**
* Sets the handler for the watch.
*
* @todo this function only exists because of the weird