e151cd9
--- conf/catalina.policy.orig	2022-11-04 16:17:41.227506990 +0800
e151cd9
+++ conf/catalina.policy	2022-11-04 16:21:51.393351415 +0800
e151cd9
@@ -56,6 +56,15 @@ grant codeBase "file:${java.home}/lib/ex
e151cd9
 //        permission java.security.AllPermission;
e151cd9
 //};
e151cd9
 
e151cd9
+// ========== RHEL SPECIFIC CODE PERMISSIONS =======================================
e151cd9
+
e151cd9
+
e151cd9
+// Allowing everything in /usr/share/java allows too many unknowns to be permitted
e151cd9
+// Specifying the individual jars that tomcat needs to function with the security manager
e151cd9
+// is the safest way forward.
e151cd9
+grant codeBase "file:/usr/share/java/ecj/ecj.jar" {
e151cd9
+        permission java.security.AllPermission;
e151cd9
+};
e151cd9
 
e151cd9
 // ========== CATALINA CODE PERMISSIONS =======================================
e151cd9
 
e151cd9
@@ -261,4 +270,4 @@ grant codeBase "file:${catalina.home}/we
e151cd9
 //
e151cd9
 // The permissions granted to a specific JAR
e151cd9
 // grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
e151cd9
-// };
e151cd9
\ No newline at end of file
e151cd9
+// };