Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap the System.load and System.loadLibrary calls with doPrivileged. #243

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

mulugetam
Copy link
Contributor

@mulugetam mulugetam commented Jan 30, 2023

In cases where pluggable modules are in use and Java security permissions are applied, such as in OpenSearch, wrapping the System.load and System.loadLibrary calls with AccessController.doPrivileged resolves access control exceptions thrown by plugins that are granted access to load a native library. This PR does that.

This PR is motivated by an effort to add zstd-jni and lz4-java compressions into OpenSearch compression plugin.

Signed-off-by: Mulugeta Mammo mulugeta.mammo@intel.com

Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
@luben
Copy link
Owner

luben commented Feb 4, 2023

LGTM! Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants