From b3bd48edfc1aab0a9dc64bfa4c380d845d218e73 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 25 Apr 2003 23:50:34 +0000 Subject: 2003-04-25 Havoc Pennington test suite is slightly hosed at the moment, will fix soon * bus/connection.c (bus_connections_expire_incomplete): fix to properly disable the timeout when required (bus_connection_set_name): check whether we can remove incomplete connections timeout after we complete each connection. * dbus/dbus-mainloop.c (check_timeout): fix this up a bit, probably still broken. * bus/services.c (bus_registry_acquire_service): implement max number of services owned, and honor allow/deny rules on which services a connection can own. * bus/connection.c (bus_connection_get_policy): report errors here * bus/activation.c: implement limit on number of pending activations --- bus/config-parser.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'bus/config-parser.c') diff --git a/bus/config-parser.c b/bus/config-parser.c index bd1c47b8..5e279639 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -306,7 +306,7 @@ bus_config_parser_new (const DBusString *basedir) * and legitimate auth will fail. If interactive auth (ask user for * password) is allowed, then potentially it has to be quite long. */ - parser->limits.auth_timeout = 3000; /* 3 seconds */ + parser->limits.auth_timeout = 30000; /* 30 seconds */ parser->limits.max_incomplete_connections = 32; parser->limits.max_connections_per_user = 128; @@ -316,6 +316,9 @@ bus_config_parser_new (const DBusString *basedir) * DOS all the other users. */ parser->limits.max_completed_connections = 1024; + + parser->limits.max_pending_activations = 256; + parser->limits.max_services_per_connection = 256; parser->refcount = 1; @@ -1215,6 +1218,18 @@ set_limit (BusConfigParser *parser, must_be_int = TRUE; parser->limits.max_connections_per_user = value; } + else if (strcmp (name, "max_pending_activations") == 0) + { + must_be_positive = TRUE; + must_be_int = TRUE; + parser->limits.max_pending_activations = value; + } + else if (strcmp (name, "max_services_per_connection") == 0) + { + must_be_positive = TRUE; + must_be_int = TRUE; + parser->limits.max_services_per_connection = value; + } else { dbus_set_error (error, DBUS_ERROR_FAILED, -- cgit