From 0662ae9a4b3f73b973c8b7b57575dc191d567566 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jan 2025 19:48:01 +0000 Subject: [PATCH] Wrap a call to QatZipper with AccessController.doPrivileged. (#211) * Grant qat-java a permission to modify arbitrary thread. Signed-off-by: Ubuntu Signed-off-by: Mulugeta Mammo * Wrap a QatZipper() inside AccessController.doPrivileged(). Signed-off-by: Mulugeta Mammo * Fix GitHib action workflows (#212) Signed-off-by: Andriy Redko --------- Signed-off-by: Ubuntu Signed-off-by: Mulugeta Mammo Signed-off-by: Andriy Redko Co-authored-by: Ubuntu Co-authored-by: Andriy Redko (cherry picked from commit 9de7fd34666986438ac398f951592a25cc715bdc) Signed-off-by: github-actions[bot] --- .../opensearch/index/codec/customcodecs/QatZipperFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/index/codec/customcodecs/QatZipperFactory.java b/src/main/java/org/opensearch/index/codec/customcodecs/QatZipperFactory.java index a02f09a..9afdab6 100644 --- a/src/main/java/org/opensearch/index/codec/customcodecs/QatZipperFactory.java +++ b/src/main/java/org/opensearch/index/codec/customcodecs/QatZipperFactory.java @@ -31,7 +31,9 @@ public class QatZipperFactory { * @param pmode polling mode. */ public static QatZipper createInstance(Algorithm algorithm, int level, Mode mode, int retryCount, PollingMode pmode) { - return new QatZipper(algorithm, level, mode, retryCount, pmode); + return java.security.AccessController.doPrivileged( + (java.security.PrivilegedAction) () -> new QatZipper(algorithm, level, mode, retryCount, pmode) + ); } /**