ossec-hids: notify.c (HEAD) [dcid]

1 view
Skip to first unread message

OSSEC CVS

unread,
Jun 26, 2009, 9:50:05 AM6/26/09
to osse...@ossec.net
Module name: ossec-hids
Changes by: dcid 09/06/26 10:50:02

Modified files:
notify.c

Log message:
Description: Adding shared-version number on the output from agent.
Reviewed by: dcid
Bug:

Index: notify.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/client-agent/notify.c,v
diff -u -r1.22 -r1.23
--- notify.c 24 Jun 2009 17:06:24 -0000 1.22
+++ notify.c 26 Jun 2009 13:50:02 -0000 1.23
@@ -124,7 +124,22 @@


/* creating message */
- snprintf(tmp_msg, OS_SIZE_1024, "#!-%s\n%s",uname, shared_files);
+ if(File_DateofChange(AGENTCONFIGINT) > 0)
+ {
+ os_md5 md5sum;
+ if(OS_MD5_File(AGENTCONFIGINT, md5sum) != 0)
+ {
+ snprintf(tmp_msg, OS_SIZE_1024, "#!-%s\n%s",uname, shared_files);
+ }
+ else
+ {
+ snprintf(tmp_msg, OS_SIZE_1024, "#!-%s / %s\n%s",uname, md5sum, shared_files);
+ }
+ }
+ else
+ {
+ snprintf(tmp_msg, OS_SIZE_1024, "#!-%s\n%s",uname, shared_files);
+ }


/* Sending status message */

Reply all
Reply to author
Forward
0 new messages