summaryrefslogtreecommitdiff
path: root/bus/config-parser.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-10-01 19:45:00 +0100
committerSimon McVittie <smcv@debian.org>2014-10-01 19:45:00 +0100
commit255f62947424c4622609eb93ed53371dda28aac9 (patch)
tree6f8c5dbb96e48fa2d40919bb3282fae0b6d953de /bus/config-parser.c
parentc03b8e681afa8e45977fc74e30142497939b47d1 (diff)
parent33ee25f98af863e9355fd53b9184c0b798343b89 (diff)
downloaddbus-upstream/1.9.0.tar.gz
Imported Upstream version 1.9.0upstream/1.9.0
Diffstat (limited to 'bus/config-parser.c')
-rw-r--r--bus/config-parser.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/bus/config-parser.c b/bus/config-parser.c
index 12a2d2e7..7bc9c019 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
@@ -318,6 +318,9 @@ merge_included (BusConfigParser *parser,
if (included->keep_umask)
parser->keep_umask = TRUE;
+ if (included->allow_anonymous)
+ parser->allow_anonymous = TRUE;
+
if (included->pidfile != NULL)
{
dbus_free (parser->pidfile);
@@ -435,7 +438,12 @@ 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 = 30000; /* 30 seconds */
+ parser->limits.auth_timeout = 5000; /* 5 seconds */
+
+ /* Do not allow a fd to stay forever in dbus-daemon
+ * https://bugs.freedesktop.org/show_bug.cgi?id=80559
+ */
+ parser->limits.pending_fd_timeout = 150000; /* 2.5 minutes */
parser->limits.max_incomplete_connections = 64;
parser->limits.max_connections_per_user = 256;
@@ -464,7 +472,7 @@ bus_config_parser_new (const DBusString *basedir,
/* this is effectively a limit on message queue size for messages
* that require a reply
*/
- parser->limits.max_replies_per_connection = 1024*8;
+ parser->limits.max_replies_per_connection = 128;
}
parser->refcount = 1;
@@ -1899,6 +1907,12 @@ set_limit (BusConfigParser *parser,
must_be_int = TRUE;
parser->limits.auth_timeout = value;
}
+ else if (strcmp (name, "pending_fd_timeout") == 0)
+ {
+ must_be_positive = TRUE;
+ must_be_int = TRUE;
+ parser->limits.pending_fd_timeout = value;
+ }
else if (strcmp (name, "reply_timeout") == 0)
{
must_be_positive = TRUE;
@@ -3105,6 +3119,7 @@ limits_equal (const BusLimits *a,
|| a->max_message_unix_fds == b->max_message_unix_fds
|| a->activation_timeout == b->activation_timeout
|| a->auth_timeout == b->auth_timeout
+ || a->pending_fd_timeout == b->pending_fd_timeout
|| a->max_completed_connections == b->max_completed_connections
|| a->max_incomplete_connections == b->max_incomplete_connections
|| a->max_connections_per_user == b->max_connections_per_user