Fix OpenSSL library loading for MariaDB authentication plugins#233
Merged
Fix OpenSSL library loading for MariaDB authentication plugins#233
Conversation
MariaDB authentication plugins (e.g., caching_sha2_password) depend on OpenSSL, but when MariaDB loads them via dlopen at runtime, the dynamic linker can't find OpenSSL because it's in a different JLL artifact. This fix pre-loads OpenSSL libraries with RTLD_GLOBAL when the API module initializes. This makes OpenSSL symbols globally available to subsequently loaded libraries, allowing the plugins to find them. Fixes #232 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #233 +/- ##
==========================================
+ Coverage 63.27% 63.40% +0.13%
==========================================
Files 9 10 +1
Lines 1111 1115 +4
==========================================
+ Hits 703 707 +4
Misses 408 408 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
RTLD_GLOBALto fix plugin loading on macOS/LinuxOpenSSL_jllas explicit dependencyProblem
MariaDB authentication plugins (e.g.,
caching_sha2_password) depend on OpenSSL, but when MariaDB loads them viadlopenat runtime, the dynamic linker can't find OpenSSL because:@rpath/libssl.3.dylibas a dependencySolution
Pre-load OpenSSL libraries with
RTLD_GLOBALwhen the API module initializes. This makes OpenSSL symbols globally available to subsequently loaded libraries, allowing the plugins to find them even though the@rpathcan't resolve to the actual file location.Test plan
caching_sha2_passwordauthentication (the default)Fixes #232
@nakagami Could you please test this PR to verify it fixes the issue on your system? You can try it with:
🤖 Generated with Claude Code