-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump version of Hadoop dependencies to 3.3.5 (#6995)
Signed-off-by: Tianli Feng <[email protected]> Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit 6786608)
- Loading branch information
Showing
11 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
.../secure-sm/src/main/java/org/opensearch/secure_sm/SecuredForkJoinWorkerThreadFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.secure_sm; | ||
|
||
import java.security.AccessControlContext; | ||
import java.security.AccessController; | ||
import java.security.Permission; | ||
import java.security.Permissions; | ||
import java.security.PrivilegedAction; | ||
import java.security.ProtectionDomain; | ||
import java.util.concurrent.ForkJoinPool; | ||
import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory; | ||
import java.util.concurrent.ForkJoinWorkerThread; | ||
|
||
public class SecuredForkJoinWorkerThreadFactory implements ForkJoinWorkerThreadFactory { | ||
static AccessControlContext contextWithPermissions(Permission... perms) { | ||
Permissions permissions = new Permissions(); | ||
for (Permission perm : perms) | ||
permissions.add(perm); | ||
return new AccessControlContext(new ProtectionDomain[] { new ProtectionDomain(null, permissions) }); | ||
} | ||
|
||
// ACC for access to the factory | ||
private static final AccessControlContext ACC = contextWithPermissions( | ||
new RuntimePermission("getClassLoader"), | ||
new RuntimePermission("setContextClassLoader"), | ||
new RuntimePermission("modifyThreadGroup"), | ||
new RuntimePermission("modifyThread") | ||
); | ||
|
||
public final ForkJoinWorkerThread newThread(ForkJoinPool pool) { | ||
return AccessController.doPrivileged(new PrivilegedAction<>() { | ||
public ForkJoinWorkerThread run() { | ||
return new ForkJoinWorkerThread(pool) { | ||
|
||
}; | ||
} | ||
}, ACC); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
plugins/repository-hdfs/licenses/hadoop-client-api-3.3.4.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/repository-hdfs/licenses/hadoop-client-api-3.3.6.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
12ac6f103a0ff29fce17a078c7c64d25320b6165 |
1 change: 0 additions & 1 deletion
1
plugins/repository-hdfs/licenses/hadoop-client-runtime-3.3.4.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/repository-hdfs/licenses/hadoop-client-runtime-3.3.6.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
81065531e63fccbe85fb04a3274709593fb00d3c |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ba40aca60f39599d5b1f1d32b35295bfde1f3c8b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters