-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch backport to 7.0.x: Issues 7448, 7493 #12392
Open
jlucovsky
wants to merge
4
commits into
OISF:main-7.0.x
Choose a base branch
from
jlucovsky:7448/4
base: main-7.0.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
This commit improves error handling for cases when file(s) cannot be opened. - Return NULL if file object can't be opened - checks whether the file object has been opened before dereferencing the per-file context. Issue: 7447 (cherry picked from commit e72fc39)
Issue: 7447 When the output file can't be opened, 2 error messages are displayed for the same problem. The second message doesn't add value and lacks context (error reason, e.g., "Permission denied"). Retaining the second message as a debug message. Without this commit: Error: logopenfile: Error opening file: "/home/jlucovsky/src/jal/suricata-verify/tests/bug-5198/output/noperms/eve.1.json": Permission denied [SCLogOpenFileFp:util-logopenfile.c:428] Error: logopenfile: Unable to open slot 1 for file /home/jlucovsky/src/jal/suricata-verify/tests/bug-5198/output/noperms/eve.json [LogFileEnsureExists:util-logopenfile.c:737] Error: runmodes: unable to initialize sub-module eve-log.stats [RunModeInitializeEveOutput:runmodes.c:692] With commit: Error: logopenfile: Error opening file: "/home/jlucovsky/src/jal/suricata-verify/tests/bug-5198/output/noperms/eve.1.json": Permission denied [SCLogOpenFileFp:util-logopenfile.c:428] Error: runmodes: unable to initialize sub-module eve-log.stats [RunModeInitializeEveOutput:runmodes.c:692] (cherry picked from commit d853972)
The fix for issue 7447 introduced an error with threaded eve output. The changes that were committed for that issue mishandled the return value when a file is being opened for the 2nd or higher time. Instead of returning the existing file context, null was returned. (cherry picked from commit 1d996c5)
Issue: 7466 This commit releases the memory for the flow variable "key" when the flow variable is of type string. The key is allocated in the Lua extension logic. (cherry picked from commit 2d9df5a)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main-7.0.x #12392 +/- ##
==============================================
+ Coverage 78.58% 83.13% +4.54%
==============================================
Files 922 922
Lines 260984 261187 +203
==============================================
+ Hits 205106 217133 +12027
+ Misses 55878 44054 -11824
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24214 |
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.
Continuation of #12391
Link to tickets:
Describe changes:
Updates:
Provide values to any of the below to override the defaults.
link to the pull request in the respective
_BRANCH
variable.SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=