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 System.load and System.loadLibrary calls with doPrivileged. #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mulugetam
Copy link

@mulugetam mulugetam commented Jan 31, 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 a feature request to add lz4-java and zstd-jni compressions to OpenSearch. The zstd-jni equivalent of this PR is available here.

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/java/net/jpountz/util/Native.java

@mulugetam
Copy link
Author

@odaira Can you please review/merge?

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