-
Notifications
You must be signed in to change notification settings - Fork 807
Agent: Change trap command signal to TERM #1440
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1440 +/- ##
===========================================
- Coverage 40.31% 40.26% -0.05%
===========================================
Files 464 466 +2
Lines 13899 14023 +124
===========================================
+ Hits 5603 5647 +44
- Misses 8296 8376 +80
Continue to review full report at Codecov.
|
CHANGELOG.md
Outdated
@@ -62,8 +62,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). | |||
instead of $HOME. #1143 | |||
- Put environment config options in `server_config.json` into a separate | |||
section named "environment". #1161 | |||
- Automatically register if BlackBox tests are run on a fresh installation. | |||
#1180 | |||
- Automatically register if BlackBox tests are run on a fresh installation. #1180 |
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.
I've been trying to keep the lines in the changelog <= 80 characters.
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.
This was done by black I think. Cause the previous one looked like 1180
is a header.
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.
Black shouldn't be formatting markdown files.
CHANGELOG.md
Outdated
@@ -77,6 +76,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). | |||
- Improve runtime of some unit tests. #1125 | |||
- Run curl OR wget (not both) when attempting to communicate as a new user on | |||
Linux. #1407 | |||
- Changed trap command signal from INT to TERM. #1406 |
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.
You've put this under v1.11.0. This needs to go under "Unreleased".
In addition, put it under "fixed", and just say we fixed the trap post-breach action not producing any output. The specific signal we're using is too low level. Users don't care.
"trap 'echo \"Successfully used trap command\"' INT && kill -2 $$ ;", | ||
"trap - INT", # untrap SIGINT | ||
# trap and send SIGTERM signal | ||
"trap 'echo \"Successfully used trap command\"' TERM && kill -15 $$ ; ", |
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.
Is the extra space after the ;
at the end of this string necessary?
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.
I don't understand. So why does the signal get sent from the manual run but not from island?
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.
Approved, but fix Mike's comments
CHANGELOG.md
Outdated
@@ -62,8 +62,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). | |||
instead of $HOME. #1143 | |||
- Put environment config options in `server_config.json` into a separate | |||
section named "environment". #1161 | |||
- Automatically register if BlackBox tests are run on a fresh installation. | |||
#1180 | |||
- Automatically register if BlackBox tests are run on a fresh installation. #1180 |
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.
- Automatically register if BlackBox tests are run on a fresh installation. #1180 | |
- Automatically register if BlackBox tests are run on a fresh | |
installation. #1180 |
8ec8545
to
9dfbab8
Compare
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.
Same question as Vakaris.
Tested with binaries?
The reason which I think that the trap command was not working from the island is the following: When running from the Island we create a child process in which we then check the output of the trap command which sends |
What does this PR do?
Fixes #1406 .
Trap command was showing no output when run from Island because the kill command never sends it.
As the technique allows for any kind of interrupt signals ( check this and this ) I have changed the INT with TERM.
PR Checklist
Testing Checklist
Added relevant unit tests?Explain Changes