-
Notifications
You must be signed in to change notification settings - Fork 0
Merge latest changes from donald/mxshadow #1
Merged
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
Make some automatic variables, which will be needed by other threads, into statics. This avoids uneeded data structures to communicate this data into threads. SSL_CTX is reference counted and thread safe (if not modified). Keep a copy in an automatic variable to lose our reference via free_ssl_ctx()->SSL_CTX_free.
We want to process each client in a individual thread. This requires a separate function per client. Factor that out.
Use mutex to protect shadow_buf and statbuf.
As clients are handled in individual threads now, individual client or communication problems can no longer spoil the game for other clients, so relace the timeout for client responses.
Increase timeout so we have a better chance to get through short network problems or server overload conditions.
Always return some more or less sensible value in errno for failing functions.
We want libnss_mxshadow.c and get_shadow_line.c in a single compilation unit, so that the preprocessor macros are in the same namespace. Include get_shadow_line.c from source not from the command line.
Do not assume that stderr is available for logging, because the calling application might reuse fd2 for antohter purpose (at least in theorie). Redirect diagnostincs to syslog.
We include get_shadow_line.c, we don't link against it. Remove uneeded target.
Remove obsolete test script.
Sign in
to join this conversation on GitHub.
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.
No description provided.