Skip to content

Commit be22a59

Browse files
opensearch-trigger-bot[bot]github-actions[bot]Ubuntureta
authored
Wrap a call to QatZipper with AccessController.doPrivileged. (#211) (#214)
* Grant qat-java a permission to modify arbitrary thread. * Wrap a QatZipper() inside AccessController.doPrivileged(). * Fix GitHib action workflows (#212) --------- (cherry picked from commit 9de7fd3) Signed-off-by: Ubuntu <ubuntu@ip-172-31-60-200.us-west-2.compute.internal> Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-60-200.us-west-2.compute.internal> Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
1 parent bdfca1a commit be22a59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/opensearch/index/codec/customcodecs/QatZipperFactory.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public class QatZipperFactory {
3131
* @param pmode polling mode.
3232
*/
3333
public static QatZipper createInstance(Algorithm algorithm, int level, Mode mode, int retryCount, PollingMode pmode) {
34-
return new QatZipper(algorithm, level, mode, retryCount, pmode);
34+
return java.security.AccessController.doPrivileged(
35+
(java.security.PrivilegedAction<QatZipper>) () -> new QatZipper(algorithm, level, mode, retryCount, pmode)
36+
);
3537
}
3638

3739
/**

0 commit comments

Comments
 (0)