summaryrefslogtreecommitdiffstats
path: root/bus/config-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/config-parser.c')
-rw-r--r--bus/config-parser.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/bus/config-parser.c b/bus/config-parser.c
index 38ce8a1d..c3e8fba1 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
@@ -115,6 +115,8 @@ struct BusConfigParser
unsigned int keep_umask : 1; /**< TRUE to keep original umask when forking */
unsigned int is_toplevel : 1; /**< FALSE if we are a sub-config-file inside another one */
+
+ unsigned int allow_anonymous : 1; /**< TRUE to allow anonymous connections */
};
static Element*
@@ -851,6 +853,20 @@ start_busconfig_child (BusConfigParser *parser,
return TRUE;
}
+ else if (element_type == ELEMENT_ALLOW_ANONYMOUS)
+ {
+ if (!check_no_attributes (parser, "allow_anonymous", attribute_names, attribute_values, error))
+ return FALSE;
+
+ if (push_element (parser, ELEMENT_ALLOW_ANONYMOUS) == NULL)
+ {
+ BUS_SET_OOM (error);
+ return FALSE;
+ }
+
+ parser->allow_anonymous = TRUE;
+ return TRUE;
+ }
else if (element_type == ELEMENT_SERVICEDIR)
{
if (!check_no_attributes (parser, "servicedir", attribute_names, attribute_values, error))
@@ -1994,6 +2010,7 @@ bus_config_parser_end_element (BusConfigParser *parser,
case ELEMENT_ASSOCIATE:
case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS:
+ case ELEMENT_ALLOW_ANONYMOUS:
break;
}
@@ -2279,6 +2296,7 @@ bus_config_parser_content (BusConfigParser *parser,
case ELEMENT_KEEP_UMASK:
case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS:
+ case ELEMENT_ALLOW_ANONYMOUS:
case ELEMENT_SELINUX:
case ELEMENT_ASSOCIATE:
if (all_whitespace (content))
@@ -2611,6 +2629,12 @@ bus_config_parser_get_keep_umask (BusConfigParser *parser)
return parser->keep_umask;
}
+dbus_bool_t
+bus_config_parser_get_allow_anonymous (BusConfigParser *parser)
+{
+ return parser->allow_anonymous;
+}
+
const char *
bus_config_parser_get_pidfile (BusConfigParser *parser)
{