Improvements for preloading libraries#1530
Improvements for preloading libraries#1530robgjansen merged 5 commits intoshadow:mainfrom robgjansen:rnglib-rpath
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1530 +/- ##
==========================================
- Coverage 52.61% 52.61% -0.01%
==========================================
Files 141 141
Lines 21171 21201 +30
Branches 5348 5357 +9
==========================================
+ Hits 11139 11154 +15
- Misses 7087 7094 +7
- Partials 2945 2953 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
sporksmith
left a comment
There was a problem hiding this comment.
Maybe something to consider for a future PR - Now that you've generalized _manager_scanRPathForLib, it looks like it'd be easy to add a more general global and/or per-process list of preload-libraries to dynamically search for and add to LD_PRELOAD.
I guess there's not that much benefit when we only have 1 such optional preload lib, but it'd also be useful for "third party" preload libs meant for use with shadow, analogous to plugins in 1.x.
Changes:
use_openssl_rng_preloadconfig option that defaults to true and allows control over our preloading of the openssl rng preload lib.LD_PRELOADkey in theenvironmentoption for processes, we now expand the~if one appears as the first character in an entry. This allows users to avoid adding an absolute path to the config file.I tested this locally in an ad-hoc manner and all features work as intended. It's a bit tricky to add tests to our framework because of the home dir absolute paths. (Unit tests would be ideal here, but the changes are mostly in C code.)
Closes #1523