X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=src%2Fshared%2Fread-agents.c;fp=src%2Fshared%2Fread-agents.c;h=2164da4032ba8d5c30f56c2e3526faaeb76a2906;hb=789cbc8e52da68eba3517b920ef22e000cf3c9fd;hp=814fb9d8717a54b739485d22ea1b14553950ecf8;hpb=ef70704f0b31b59bb719b884d6a99cb9e3e2044a;p=ossec-hids.git diff --git a/src/shared/read-agents.c b/src/shared/read-agents.c index 814fb9d..2164da4 100755 --- a/src/shared/read-agents.c +++ b/src/shared/read-agents.c @@ -114,6 +114,7 @@ int _do_print_attrs_syscheck(char *prev_attrs, char *attrs, int csv_output, break; default: printf("- Being ignored (3 or more changes).\n"); + break; } } else @@ -566,10 +567,7 @@ int _do_print_rootcheck(FILE *fp, int resolved, int time_last_scan, int i = 0; int f_found = 0; - /* Current time. */ - time_t c_time; - - /* Time from the message. */ + /* Time from the message. */ time_t s_time = 0; time_t i_time = 0; struct tm *tm_time; @@ -597,7 +595,6 @@ int _do_print_rootcheck(FILE *fp, int resolved, int time_last_scan, read_day[24] = '\0'; - c_time = time(0); fseek(fp, 0, SEEK_SET); @@ -1190,7 +1187,7 @@ int _get_agent_os(char *agent_name, char *agent_ip, agent_info *agt_info) { char *ossec_version = NULL; agt_info->os = getuname(); - os_strdup(__name " " __version, agt_info->version); + os_strdup(__ossec_name " " __version, agt_info->version); /* Removing new line. */ @@ -1277,15 +1274,11 @@ int _get_agent_os(char *agent_name, char *agent_ip, agent_info *agt_info) */ agent_info *get_agent_info(char *agent_name, char *agent_ip) { - char tmp_file[513]; char *agent_ip_pt = NULL; char *tmp_str = NULL; agent_info *agt_info = NULL; - tmp_file[512] = '\0'; - - /* Removing the "/", since it is not present on the file. */ if((agent_ip_pt = strchr(agent_ip, '/'))) {