Skip to content

Commit

Permalink
revert PrivilegedOperations
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHegarty committed Oct 31, 2024
1 parent 1b5ea70 commit 9875cf8
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.net.URLClassLoader;
import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.AllPermission;
import java.security.CodeSigner;
import java.security.CodeSource;
import java.security.DomainCombiner;
Expand Down Expand Up @@ -82,19 +81,6 @@ public static <T> T supplierWithCreateClassLoader(Supplier<T> supplier) {
);
}

public static Process ProcessBuilderStart(ProcessBuilder processBuilder) throws IOException {
try {
return AccessController.doPrivileged((PrivilegedExceptionAction<Process>) processBuilder::start, context, new AllPermission());
} catch (PrivilegedActionException pae) {
Exception e = pae.getException();
if (e instanceof IOException ioe) {
throw ioe;
} else {
throw new IOException(e);
}
}
}

@SuppressForbidden(reason = "need to create file permission")
private static FilePermission newAllFilesReadPermission() {
return new FilePermission("<<ALL FILES>>", "read");
Expand Down

0 comments on commit 9875cf8

Please sign in to comment.