summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-08-29 18:33:01 +0100
committerSimon McVittie <smcv@collabora.com>2018-08-30 17:39:38 +0100
commitea0275aaeadcffffa00a653c81cc7912aa365eae (patch)
tree5a0dd7e9f5e8682937dd700c800441883bb5c8eb /bus
parent488ed14cc0842b2947ed6c44e48d4e736449ef2d (diff)
downloaddbus-ea0275aaeadcffffa00a653c81cc7912aa365eae.tar.gz
bus_config_parser_check_doctype: Remove, unused
We have never checked the <!DOCTYPE> of busconfig XML since the libxml parser was removed in 2013, and the libxml parser was broken before that anyway. The recommended Expat parser (our only parser since 2013) does not appear to have ever validated this, so now does not seem like the time to start. Just ignore the <!DOCTYPE> if there is one. (We never validated this particularly strictly anyway; <!DOCTYPE busconfig SYSTEM "http://example.com/bees"> would have been treated as perfectly valid.) Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107739
Diffstat (limited to 'bus')
-rw-r--r--bus/config-parser-trivial.c19
-rw-r--r--bus/config-parser-trivial.h3
-rw-r--r--bus/config-parser.c19
-rw-r--r--bus/config-parser.h3
4 files changed, 0 insertions, 44 deletions
diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c
index 796c25e5..0bb9e302 100644
--- a/bus/config-parser-trivial.c
+++ b/bus/config-parser-trivial.c
@@ -127,25 +127,6 @@ bus_config_parser_unref (BusConfigParser *parser)
}
dbus_bool_t
-bus_config_parser_check_doctype (BusConfigParser *parser,
- const char *doctype,
- DBusError *error)
-{
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-
- if (strcmp (doctype, "busconfig") != 0)
- {
- dbus_set_error (error,
- DBUS_ERROR_FAILED,
- "Configuration file has the wrong document type %s",
- doctype);
- return FALSE;
- }
- else
- return TRUE;
-}
-
-dbus_bool_t
bus_config_parser_start_element (BusConfigParser *parser,
const char *element_name,
const char **attribute_names,
diff --git a/bus/config-parser-trivial.h b/bus/config-parser-trivial.h
index abe41fdf..b04d6db7 100644
--- a/bus/config-parser-trivial.h
+++ b/bus/config-parser-trivial.h
@@ -39,9 +39,6 @@ BusConfigParser* bus_config_parser_new (const DBusString *basedir,
BusConfigParser* bus_config_parser_ref (BusConfigParser *parser);
void bus_config_parser_unref (BusConfigParser *parser);
-dbus_bool_t bus_config_parser_check_doctype (BusConfigParser *parser,
- const char *doctype,
- DBusError *error);
dbus_bool_t bus_config_parser_start_element (BusConfigParser *parser,
const char *element_name,
const char **attribute_names,
diff --git a/bus/config-parser.c b/bus/config-parser.c
index c3e81cb2..b9f6d907 100644
--- a/bus/config-parser.c
+++ b/bus/config-parser.c
@@ -604,25 +604,6 @@ bus_config_parser_unref (BusConfigParser *parser)
}
}
-dbus_bool_t
-bus_config_parser_check_doctype (BusConfigParser *parser,
- const char *doctype,
- DBusError *error)
-{
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-
- if (strcmp (doctype, "busconfig") != 0)
- {
- dbus_set_error (error,
- DBUS_ERROR_FAILED,
- "Configuration file has the wrong document type %s",
- doctype);
- return FALSE;
- }
- else
- return TRUE;
-}
-
typedef struct
{
const char *name;
diff --git a/bus/config-parser.h b/bus/config-parser.h
index a24e74b2..039a4dec 100644
--- a/bus/config-parser.h
+++ b/bus/config-parser.h
@@ -40,9 +40,6 @@ BusConfigParser* bus_config_parser_new (const DBusString *basedir,
BusConfigParser* bus_config_parser_ref (BusConfigParser *parser);
void bus_config_parser_unref (BusConfigParser *parser);
-dbus_bool_t bus_config_parser_check_doctype (BusConfigParser *parser,
- const char *doctype,
- DBusError *error);
dbus_bool_t bus_config_parser_start_element (BusConfigParser *parser,
const char *element_name,
const char **attribute_names,