-
Notifications
You must be signed in to change notification settings - Fork 40
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
fix(decl): potential nil ptr deref and shell script SIGUSR handling #243
fix(decl): potential nil ptr deref and shell script SIGUSR handling #243
Conversation
Fix SIGUSR1 handling by resetting the associated exit code (138) after handler execution. Comment shell script. Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Disable shell script execution if both "before" and "after" scripts are not provided. Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alacuku, ekoops The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: 264bc63b69d6e52fdd049cb38208a7da6276804c
|
43ce926
into
falcosecurity:declarative-testing
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area pkg
What this PR does / why we need it:
This PR fixes the
SIGUSR1
signal handling for shell scripts by correctly handling the exit code set by the signal (138). The first instruction after the blockingwait
now verifies the returned exit code and clears its value if it matches the one set by the signal. Moreover, this PR fixes a potential nil pointer dereference in test context validation and conditionally disable shell script execution when both "before" and "after" scripts are not provided by the user.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: