log: keep fallback syslog open between messages#666
Open
Komzpa wants to merge 2 commits into
Open
Conversation
Komzpa
force-pushed
the
fixer-keep-syslog-open-between-messages
branch
from
May 27, 2026 07:34
701a1ca to
15ae9bf
Compare
Komzpa
force-pushed
the
fixer-keep-syslog-open-between-messages
branch
from
May 27, 2026 09:40
15ae9bf to
93ef114
Compare
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.
On platforms that use the process-global syslog API, OpenSSH currently opens and closes syslog around each individual log message.
Keep that fallback syslog state open between OpenSSH log messages instead.
log_init()still closes any OpenSSH-owned syslog state before changing ident/facility, and each log write still callsopenlog()first so OpenSSH restores its expected ident/facility after any other library uses syslog.The
openlog_r()path is unchanged.This reduces repeated fallback syslog open/close churn while preserving the lifecycle behavior that matters for reinitialization and foreign syslog users.
Regress coverage added for:
log_init()ident/facility changes;Tested:
git diff --check./regress/unittests/misc/test_miscmake unit