[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-cvs] ossec-hids: sendmail.c (HEAD) [dcid]
Module name: ossec-hids
Changes by: dcid 07/09/25 19:53:52
Modified files:
sendmail.c
Log message:
Description: Fixing e-mail alerts timezone issue, adding named rule from Leonardo Goldim <goldim at intranetworks.com.br> and some other small fixes.
Reviewed by: dcid
Bug:
http://www.ossec.net/bugs/show_bug.cgi?id=54
http://www.ossec.net/bugs/show_bug.cgi?id=40
Index: sendmail.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/os_maild/sendmail.c,v
diff -u -r1.24 -r1.25
--- sendmail.c 7 Sep 2007 21:45:06 -0000 1.24
+++ sendmail.c 25 Sep 2007 22:53:52 -0000 1.25
@@ -218,7 +218,15 @@
/* Sending date */
memset(snd_msg,'\0',128);
- strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %Z\r\n",p);
+
+
+ /* Solaris doesn't have the "%z", so we set the timezone to 0. */
+ #ifdef SOLARIS
+ strftime(snd_msg, 127, "Date: %a, %d %b %Y %T -0000\r\n",p);
+ #else
+ strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %z\r\n",p);
+ #endif
+
OS_SendTCP(socket,snd_msg);
@@ -507,7 +515,15 @@
/* Sending date */
memset(snd_msg,'\0',128);
- strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %Z\r\n",p);
+
+
+ /* Solaris doesn't have the "%z", so we set the timezone to 0. */
+ #ifdef SOLARIS
+ strftime(snd_msg, 127, "Date: %a, %d %b %Y %T -0000\r\n",p);
+ #else
+ strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %z\r\n",p);
+ #endif
+
OS_SendTCP(socket,snd_msg);
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.