aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cfg_rcl.c8
-rw-r--r--src/cfg_xml.c4
2 files changed, 4 insertions, 8 deletions
diff --git a/src/cfg_rcl.c b/src/cfg_rcl.c
index be7bb2a48..c9e1c4437 100644
--- a/src/cfg_rcl.c
+++ b/src/cfg_rcl.c
@@ -39,7 +39,6 @@ rspamd_rcl_logging_handler (struct config_file *cfg, ucl_object_t *obj,
gpointer ud, struct rspamd_rcl_section *section, GError **err)
{
ucl_object_t *val;
- gchar *filepath;
const gchar *facility, *log_type, *log_level;
val = ucl_object_find_key (obj, "type");
@@ -51,13 +50,8 @@ rspamd_rcl_logging_handler (struct config_file *cfg, ucl_object_t *obj,
g_set_error (err, CFG_RCL_ERROR, ENOENT, "filename attribute must be specified for file logging type");
return FALSE;
}
- if ((filepath = realpath (ucl_object_tostring (val), NULL)) == NULL ||
- access (filepath, W_OK) == -1) {
- g_set_error (err, CFG_RCL_ERROR, errno, "log file is inaccessible");
- return FALSE;
- }
cfg->log_type = RSPAMD_LOG_FILE;
- cfg->log_file = memory_pool_strdup (cfg->cfg_pool, filepath);
+ cfg->log_file = memory_pool_strdup (cfg->cfg_pool, ucl_object_tostring (val));
}
else if (g_ascii_strcasecmp (log_type, "syslog") == 0) {
/* Need to get facility */
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index ffe9b8027..1e20f0456 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -834,7 +834,8 @@ rspamd_xml_start_element (GMarkupParseContext *context, const gchar *element_nam
}
else {
tobj = ucl_object_new ();
- if (process_attrs (attribute_names, attribute_values, tobj)) {
+ if (g_ascii_strcasecmp (element_name, "symbol") == 0 &&
+ process_attrs (attribute_names, attribute_values, tobj)) {
ud->parent_pointer[ud->nested] = tobj;
tobj->type = UCL_OBJECT;
ud->parent_pointer[ud->nested - 1] =
@@ -853,6 +854,7 @@ rspamd_xml_start_element (GMarkupParseContext *context, const gchar *element_nam
}
else {
ucl_object_unref (tobj);
+ process_attrs (attribute_names, attribute_values, ud->parent_pointer[ud->nested - 1]);
}
}
break;