From 07a4ad4b04702fc384b324e5f902a5b2279b0c25 Mon Sep 17 00:00:00 2001 From: Dennis Kaarsemaker Date: Wed, 12 Nov 2008 08:51:00 -0500 Subject: Bug 15393 - support allow_anonymous config variable * bus/bus.c: Set allow_anonymous if specified from parser. * bus/config-parser.c: Parse it. * bus/config-parser-common.h: Declare it. Signed-off-by: Colin Walters --- bus/bus.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bus/bus.c') diff --git a/bus/bus.c b/bus/bus.c index e5733fec..42cc295f 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -55,6 +55,7 @@ struct BusContext BusLimits limits; unsigned int fork : 1; unsigned int keep_umask : 1; + unsigned int allow_anonymous : 1; }; static dbus_int32_t server_data_slot = -1; @@ -189,6 +190,9 @@ new_connection_callback (DBusServer *server, dbus_connection_set_max_message_size (new_connection, context->limits.max_message_size); + dbus_connection_set_allow_anonymous (new_connection, + context->allow_anonymous); + /* on OOM, we won't have ref'd the connection so it will die. */ } @@ -386,6 +390,7 @@ process_config_first_time_only (BusContext *context, context->fork = bus_config_parser_get_fork (parser); context->keep_umask = bus_config_parser_get_keep_umask (parser); + context->allow_anonymous = bus_config_parser_get_allow_anonymous (parser); _DBUS_ASSERT_ERROR_IS_CLEAR (error); retval = TRUE; -- cgit