lz4-java icon indicating copy to clipboard operation
lz4-java copied to clipboard

Wrap System.load and System.loadLibrary calls with doPrivileged.

Open mulugetam opened this issue 2 years ago • 1 comments
trafficstars

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 [email protected]

mulugetam avatar Jan 31 '23 01:01 mulugetam

@odaira Can you please review/merge?

mulugetam avatar May 09 '23 20:05 mulugetam