X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fconfig%2Fglobal-config.c;fp=src%2Fconfig%2Fglobal-config.c;h=a535a813d756d49137136cc78e3354101cd77749;hp=dad66a4a136f758bf1268660a2e7fd9e225c087d;hb=789cbc8e52da68eba3517b920ef22e000cf3c9fd;hpb=ef70704f0b31b59bb719b884d6a99cb9e3e2044a diff --git a/src/config/global-config.c b/src/config/global-config.c index dad66a4..a535a81 100755 --- a/src/config/global-config.c +++ b/src/config/global-config.c @@ -155,13 +155,17 @@ int Read_Global(XML_NODE node, void *configp, void *mailp) char *xml_prelude = "prelude_output"; char *xml_prelude_profile = "prelude_profile"; char *xml_prelude_log_level = "prelude_log_level"; + char *xml_zeromq_output = "zeromq_output"; + char *xml_zeromq_output_uri = "zeromq_uri"; char *xml_stats = "stats"; char *xml_memorysize = "memory_size"; char *xml_white_list = "white_list"; char *xml_compress_alerts = "compress_alerts"; + char *xml_custom_alert_output = "custom_alert_output"; char *xml_emailto = "email_to"; char *xml_emailfrom = "email_from"; + char *xml_emailidsname = "email_idsname"; char *xml_smtpserver = "smtp_server"; char *xml_mailmaxperhour = "email_maxperhour"; @@ -227,6 +231,14 @@ int Read_Global(XML_NODE node, void *configp, void *mailp) merror(XML_VALUENULL, ARGV0, node[i]->element); return(OS_INVALID); } + else if(strcmp(node[i]->element, xml_custom_alert_output) == 0) + { + if(Config) + { + Config->custom_alert_output= 1; + os_strdup(node[i]->content, Config->custom_alert_output_format); + } + } /* Mail notification */ else if(strcmp(node[i]->element, xml_mailnotify) == 0) { @@ -307,6 +319,30 @@ int Read_Global(XML_NODE node, void *configp, void *mailp) Config->prelude_log_level = atoi(node[i]->content); } } + /* ZeroMQ output */ + else if(strcmp(node[i]->element, xml_zeromq_output) == 0) + { + if(strcmp(node[i]->content, "yes") == 0) + { + if(Config) Config->zeromq_output = 1; + } + else if(strcmp(node[i]->content, "no") == 0) + { + if(Config) Config->zeromq_output = 0; + } + else + { + merror(XML_VALUEERR,ARGV0,node[i]->element, node[i]->content); + return(OS_INVALID); + } + } + else if(strcmp(node[i]->element, xml_zeromq_output_uri) == 0) + { + if(Config) + { + Config->zeromq_output_uri = strdup(node[i]->content); + } + } /* Log all */ else if(strcmp(node[i]->element, xml_logall) == 0) { @@ -456,7 +492,7 @@ int Read_Global(XML_NODE node, void *configp, void *mailp) } /* For the email now - * email_to, email_from, smtp_Server and maxperhour. + * email_to, email_from, idsname, smtp_Server and maxperhour. * We will use a separate structure for that. */ else if(strcmp(node[i]->element, xml_emailto) == 0) @@ -494,6 +530,17 @@ int Read_Global(XML_NODE node, void *configp, void *mailp) os_strdup(node[i]->content, Mail->from); } } + else if(strcmp(node[i]->element, xml_emailidsname) == 0) + { + if(Mail) + { + if(Mail->idsname) + { + free(Mail->idsname); + } + os_strdup(node[i]->content, Mail->idsname); + } + } else if(strcmp(node[i]->element, xml_smtpserver) == 0) { #ifndef WIN32