Add library bz2 to compress and uncompress Ubuntu ovals#4834
Merged
Conversation
added 5 commits
April 2, 2020 12:36
|
|
||
| input = fopen(filebz2, "rb"); | ||
| if (!input) { | ||
| merror(FOPEN_ERROR, file, errno, strerror(errno)); |
Contributor
There was a problem hiding this comment.
This error shows file instead of filebz2
|
|
||
| output = fopen(file, "wb" ); | ||
| if (!output) { | ||
| merror(FOPEN_ERROR, filebz2, errno, strerror(errno)); |
Contributor
There was a problem hiding this comment.
This error shows filebz2 instead of file
| #define WM_VULNDETECTOR_DOWN_ATTEMPTS 5 | ||
| #define VU_DEF_IGNORE_TIME 21600 // 6 hours | ||
| #define VU_TEMP_FILE "tmp/vuln-temp" | ||
| #define VU_TEMP_FILE_BZ2 "tmp/vuln-temp.bz2" |
Contributor
There was a problem hiding this comment.
It could be replaced by `#define VU_TEMP_FILE_BZ2 VU_TEMP_FILE ".bz2"
Contributor
|
The uncompression process has been tested over valgrind to check any memory error. Here the report: |
File_DateofChange() was not being wrapped, and stat() left the data uninitialized.
vikman90
requested changes
Apr 6, 2020
vikman90
requested changes
Apr 6, 2020
Co-Authored-By: Vikman Fdez-Castro <victor@wazuh.com>
Co-Authored-By: Vikman Fdez-Castro <victor@wazuh.com>
Co-Authored-By: Vikman Fdez-Castro <victor@wazuh.com>
Co-Authored-By: Vikman Fdez-Castro <victor@wazuh.com>
Co-Authored-By: Vikman Fdez-Castro <victor@wazuh.com>
Closed
Merged
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Since a few days the Ubuntu feed is obtained from a compressed file in bz2 format.
With this PR the corresponding library is added to be able to compress and decompress this file format.
Configuration options
Not aplicable.
Logs/Alerts example
Check the Debian and Ubuntu feeds are in database
Tests