ssh: Clean up libssh connection on terminating signals #18632
Merged
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.
When receiving SIGTERM or SIGINT, give libssh a chance to clean up the connection. In particular, that will close a running
ProxyCommandprocess when logging out of Cockpit.Fixes #18310
https://bugzilla.redhat.com/show_bug.cgi?id=2185785
I tested this with the simplified reproducer in https://bugzilla.redhat.com/show_bug.cgi?id=2185785#c4 . This should also obsolete the known issue cockpit-project/bots#4635 , i.e.
TestIPA.testQualifiedUsersshould now pass without a naughty skip. Update: I checked all test runs, and they all passed properly. 馃憤