/[packages]/backports/8/java-latest-openjdk/current/SOURCES/rh1915071-always_initialise_configurator_access.patch
ViewVC logotype

Contents of /backports/8/java-latest-openjdk/current/SOURCES/rh1915071-always_initialise_configurator_access.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1760752 - (show annotations) (download)
Sat Dec 4 23:35:46 2021 UTC (2 years, 11 months ago) by neoclust
File size: 2903 byte(s)
New version 16.0.2+7
1 diff --git openjdk.orig/src/java.base/share/classes/java/security/Security.java openjdk/src/java.base/share/classes/java/security/Security.java
2 --- openjdk.orig/src/java.base/share/classes/java/security/Security.java
3 +++ openjdk/src/java.base/share/classes/java/security/Security.java
4 @@ -32,6 +32,7 @@
5
6 import jdk.internal.event.EventHelper;
7 import jdk.internal.event.SecurityPropertyModificationEvent;
8 +import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess;
9 import jdk.internal.access.SharedSecrets;
10 import jdk.internal.util.StaticProperty;
11 import sun.security.util.Debug;
12 @@ -74,6 +75,15 @@
13 }
14
15 static {
16 + // Initialise here as used by code with system properties disabled
17 + SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
18 + new JavaSecuritySystemConfiguratorAccess() {
19 + @Override
20 + public boolean isSystemFipsEnabled() {
21 + return SystemConfigurator.isSystemFipsEnabled();
22 + }
23 + });
24 +
25 // doPrivileged here because there are multiple
26 // things in initialize that might require privs.
27 // (the FileInputStream call and the File.exists call,
28 @@ -193,9 +203,8 @@
29 }
30
31 String disableSystemProps = System.getProperty("java.security.disableSystemPropertiesFile");
32 - if (disableSystemProps == null &&
33 - "true".equalsIgnoreCase(props.getProperty
34 - ("security.useSystemPropertiesFile"))) {
35 + if ((disableSystemProps == null || "false".equalsIgnoreCase(disableSystemProps)) &&
36 + "true".equalsIgnoreCase(props.getProperty("security.useSystemPropertiesFile"))) {
37 if (SystemConfigurator.configure(props)) {
38 loadedProps = true;
39 }
40 diff --git openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
41 --- openjdk.orig/src/java.base/share/classes/java/security/SystemConfigurator.java
42 +++ openjdk/src/java.base/share/classes/java/security/SystemConfigurator.java
43 @@ -38,8 +38,6 @@
44 import java.util.Properties;
45 import java.util.regex.Pattern;
46
47 -import jdk.internal.misc.SharedSecrets;
48 -import jdk.internal.misc.JavaSecuritySystemConfiguratorAccess;
49 import sun.security.util.Debug;
50
51 /**
52 @@ -65,16 +63,6 @@
53
54 private static boolean systemFipsEnabled = false;
55
56 - static {
57 - SharedSecrets.setJavaSecuritySystemConfiguratorAccess(
58 - new JavaSecuritySystemConfiguratorAccess() {
59 - @Override
60 - public boolean isSystemFipsEnabled() {
61 - return SystemConfigurator.isSystemFipsEnabled();
62 - }
63 - });
64 - }
65 -
66 /*
67 * Invoked when java.security.Security class is initialized, if
68 * java.security.disableSystemPropertiesFile property is not set and

  ViewVC Help
Powered by ViewVC 1.1.30