Skip to content

Commit

Permalink
Merge pull request #740 from wazuh/agentid
Browse files Browse the repository at this point in the history
Modified ossec-remoted to show agent ID when reported as invalid
  • Loading branch information
Daniel B. Cid committed Feb 25, 2016
2 parents de4d720 + aa19a22 commit 52698a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/error_messages/error_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
#define ENCSIZE_ERROR "%s(1405): ERROR: Message size not valid: '%s'."
#define ENCSUM_ERROR "%s(1406): ERROR: Checksum mismatch on message from '%s'."
#define ENCTIME_ERROR "%s(1407): ERROR: Duplicated counter for '%s'."
#define ENC_IP_ERROR "%s(1408): ERROR: Invalid ID for the source ip: '%s'."
#define ENC_IP_ERROR "%s(1408): ERROR: Invalid ID %s for the source ip: '%s'."
#define ENCFILE_CHANGED "%s(1409): INFO: Authentication file changed. Updating."
#define ENC_READ "%s(1410): INFO: Reading authentication keys file."

Expand Down Expand Up @@ -285,4 +285,3 @@
#define OS_AG_DISCON "ossec: Agent disconnected: '%s'."

#endif /* _ERROR_MESSAGES__H */

5 changes: 2 additions & 3 deletions src/remoted/secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ void HandleSecure()
if (check_keyupdate()) {
agentid = OS_IsAllowedDynamicID(&keys, buffer + 1, srcip);
if (agentid == -1) {
merror(ENC_IP_ERROR, ARGV0, srcip);
merror(ENC_IP_ERROR, ARGV0, buffer + 1, srcip);
continue;
}
} else {
merror(ENC_IP_ERROR, ARGV0, srcip);
merror(ENC_IP_ERROR, ARGV0, buffer + 1, srcip);
continue;
}
}
Expand Down Expand Up @@ -174,4 +174,3 @@ void HandleSecure()
}
}
}

0 comments on commit 52698a0

Please sign in to comment.