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 */