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");
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 */
}
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] =
}
else {
ucl_object_unref (tobj);
+ process_attrs (attribute_names, attribute_values, ud->parent_pointer[ud->nested - 1]);
}
}
break;