Skip to content

Commit

Permalink
[2.7-rc1-maild] add md5/sha1 checksum back to syscheck email alerts
Browse files Browse the repository at this point in the history
Change version to v2.7
  • Loading branch information
jbcheng committed Nov 9, 2012
1 parent 8756e90 commit 90be4e6
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/LOCATION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DIR="/var/ossec27rc1f"
DIR="/var/ossec"
CC=gcc
GCC=gcc
CLANG=clang
2 changes: 1 addition & 1 deletion src/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.7-rc1
v2.7
2 changes: 1 addition & 1 deletion src/headers/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

/* Some Global names */
#define __name "OSSEC HIDS"
#define __version "v2.7-rc1"
#define __version "v2.7"
#define __author "Trend Micro Inc."
#define __contact "[email protected]"
#define __site "http://www.ossec.net"
Expand Down
2 changes: 1 addition & 1 deletion src/init/ossec-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DIR=`dirname $PWD`;

### Do not modify bellow here ###
NAME="OSSEC HIDS"
VERSION="v2.7-rc1"
VERSION="v2.7"
AUTHOR="Trend Micro Inc."
DAEMONS="ossec-logcollector ossec-syscheckd ossec-agentd ossec-execd"

Expand Down
2 changes: 1 addition & 1 deletion src/init/ossec-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi


NAME="OSSEC HIDS"
VERSION="v2.7-rc1"
VERSION="v2.7"
AUTHOR="Trend Micro Inc."
DAEMONS="ossec-monitord ossec-logcollector ossec-syscheckd ossec-analysisd ossec-maild ossec-execd ${DB_DAEMON} ${CSYSLOG_DAEMON} ${AGENTLESS_DAEMON}"

Expand Down
2 changes: 1 addition & 1 deletion src/init/ossec-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi


NAME="OSSEC HIDS"
VERSION="v2.7-rc1"
VERSION="v2.7"
AUTHOR="Trend Micro Inc."
DAEMONS="ossec-monitord ossec-logcollector ossec-remoted ossec-syscheckd ossec-analysisd ossec-maild ossec-execd ${DB_DAEMON} ${CSYSLOG_DAEMON} ${AGENTLESS_DAEMON}"

Expand Down
46 changes: 46 additions & 0 deletions src/os_maild/os_maild_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,51 @@ MailMsg *OS_RecvMailQ(file_queue *fileq, struct tm *p,
i++;
}

if (al_data->old_md5)
{
log_size = strlen(al_data->old_md5) + 16 + 4;
if(body_size > log_size)
{
strncat(logs, "Old md5sum was: ", 16);
strncat(logs, al_data->old_md5, body_size);
strncat(logs, "\r\n", 4);
body_size -= log_size;
}
}
if (al_data->new_md5)
{
log_size = strlen(al_data->new_md5) + 16 + 4;
if(body_size > log_size)
{
strncat(logs, "New md5sum is : ", 16);
strncat(logs, al_data->new_md5, body_size);
strncat(logs, "\r\n", 4);
body_size -= log_size;
}
}
if (al_data->old_sha1)
{
log_size = strlen(al_data->old_sha1) + 17 + 4;
if(body_size > log_size)
{
strncat(logs, "Old sha1sum was: ", 17);
strncat(logs, al_data->old_sha1, body_size);
strncat(logs, "\r\n", 4);
body_size -= log_size;
}
}
if (al_data->new_sha1)
{
log_size = strlen(al_data->new_sha1) + 17 + 4;
if(body_size > log_size)
{
strncat(logs, "New sha1sum is : ", 17);
strncat(logs, al_data->new_sha1, body_size);
strncat(logs, "\r\n", 4);
body_size -= log_size;
}
}


/* Subject */
subject_host = strchr(al_data->location, '>');
Expand Down Expand Up @@ -152,6 +197,7 @@ MailMsg *OS_RecvMailQ(file_queue *fileq, struct tm *p,
al_data->comment,
logs);
#endif
debug2("OS_RecvMailQ: mail->body[%s]", mail->body);

/* Checking for granular email configs */
if(Mail->gran_to)
Expand Down
2 changes: 1 addition & 1 deletion src/win32/ossec-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

!define MUI_ICON favicon.ico
!define MUI_UNICON ossec-uninstall.ico
!define VERSION "2.7-rc1"
!define VERSION "2.7"
!define NAME "OSSEC HIDS"
!define /date CDATE "%b %d %Y at %H:%M:%S"

Expand Down
2 changes: 1 addition & 1 deletion src/win32/ui.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; my template correctly.

!include "MUI.nsh"
!define VERSION "2.7-rc1"
!define VERSION "2.7"
!define NAME "OSSEC HIDS"
!define /date CDATE "%b %d %Y at %H:%M:%S"

Expand Down

0 comments on commit 90be4e6

Please sign in to comment.