mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 04:28:01 +02:00
Log to syslog when pending_fd_timeout is exceeded
This is either a denial-of-service attempt, a pathological performance problem or a dbus-daemon bug. Sysadmins should be told about any of these. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86442 [smcv: add units to timeout: it is in milliseconds] Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
3bc74092ca
commit
05cb619f0a
1 changed files with 12 additions and 0 deletions
|
|
@ -671,6 +671,18 @@ static dbus_bool_t
|
|||
pending_unix_fds_timeout_cb (void *data)
|
||||
{
|
||||
DBusConnection *connection = data;
|
||||
BusConnectionData *d = BUS_CONNECTION_DATA (connection);
|
||||
int limit;
|
||||
|
||||
_dbus_assert (d != NULL);
|
||||
limit = bus_context_get_pending_fd_timeout (d->connections->context);
|
||||
bus_context_log (d->connections->context, DBUS_SYSTEM_LOG_WARNING,
|
||||
"Connection \"%s\" (%s) has had Unix fds pending for too long, "
|
||||
"closing it (pending_fd_timeout=%d ms)",
|
||||
d->name != NULL ? d->name : "(null)",
|
||||
bus_connection_get_loginfo (connection),
|
||||
limit);
|
||||
|
||||
dbus_connection_close (connection);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue