summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-11-18 12:01:44 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-11-18 18:17:16 +0000
commit39f4b36ba546818a7dc00bfdcde9b21bb8abcaac (patch)
tree080bf3de9265a9b1b62c205be4e60c0c2ce9c178
parent97adc57d6e4800c21f3a2c432e969133e8420620 (diff)
downloaddbus-39f4b36ba546818a7dc00bfdcde9b21bb8abcaac.tar.gz
Log to syslog when auth_timeout drops an incomplete connection
This is a symptom of either a denial of service attack, or a serious performance problem. Either way, sysadmins should know. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86431
-rw-r--r--bus/connection.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bus/connection.c b/bus/connection.c
index f9cc22d9..920d4547 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -860,6 +860,14 @@ bus_connections_expire_incomplete (BusConnections *connections)
if (elapsed >= (double) auth_timeout)
{
+ /* Unfortunately, we can't identify the connection: it doesn't
+ * have a unique name yet, we don't know its uid/pid yet,
+ * and so on. */
+ bus_context_log (connections->context, DBUS_SYSTEM_LOG_INFO,
+ "Connection has not authenticated soon enough, closing it "
+ "(auth_timeout=%dms, elapsed: %.0fms)",
+ auth_timeout, elapsed);
+
_dbus_verbose ("Timing out authentication for connection %p\n", connection);
dbus_connection_close (connection);
}