diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2014-07-18 17:28:32 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-09-15 12:30:30 +0100 |
commit | 8021fd84267ee1394d96f4a119adb57de3971a62 (patch) | |
tree | 06992c03cc5d687e33522cd92da5d4adab10eba6 /dbus/dbus-transport.c | |
parent | 995734750cea65012537748ee56488c707d2f027 (diff) | |
download | dbus-8021fd84267ee1394d96f4a119adb57de3971a62.tar.gz |
DBusConnection: implements _dbus_connection_set_pending_fds_function
This is one of four commits needed to address CVE-2014-3637.
This will allow the bus to be notified whenever a file descriptor is added or
removed from a DBusConnection's DBusMessageLoader.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80559
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'dbus/dbus-transport.c')
-rw-r--r-- | dbus/dbus-transport.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index 690e5ba8..f63e0ced 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -1523,6 +1523,22 @@ _dbus_transport_get_pending_fds_count (DBusTransport *transport) return _dbus_message_loader_get_pending_fds_count (transport->loader); } +/** + * Register a function to be called whenever the number of pending file + * descriptors in the loader change. + * + * @param transport the transport + * @param callback the callback + */ +void +_dbus_transport_set_pending_fds_function (DBusTransport *transport, + void (* callback) (void *), + void *data) +{ + _dbus_message_loader_set_pending_fds_function (transport->loader, + callback, data); +} + #ifdef DBUS_ENABLE_STATS void _dbus_transport_get_stats (DBusTransport *transport, |