Commit 2ddfd025 by Jeroen Frijters Committed by Michael Koch

2004-10-18 Jeroen Frijters <jeroen@frijters.net>

	* java/security/Security.java
	(static): Use AccessController.doPrivileged to get system property.

From-SVN: r89225
parent 691e8c0f
2004-10-18 Jeroen Frijters <jeroen@frijters.net>
* java/security/Security.java
(static): Use AccessController.doPrivileged to get system property.
2004-10-18 Sven de Marothy <sven@physto.se> 2004-10-18 Sven de Marothy <sven@physto.se>
* java/nio/ByteBufferHelper.java * java/nio/ByteBufferHelper.java
......
...@@ -37,10 +37,12 @@ exception statement from your version. */ ...@@ -37,10 +37,12 @@ exception statement from your version. */
package java.security; package java.security;
import gnu.java.security.action.GetPropertyAction;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.InputStream; import java.io.InputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.security.AccessController;
import java.security.Provider; import java.security.Provider;
import java.util.Collections; import java.util.Collections;
import java.util.Enumeration; import java.util.Enumeration;
...@@ -68,9 +70,11 @@ public final class Security ...@@ -68,9 +70,11 @@ public final class Security
static static
{ {
String base = System.getProperty ("gnu.classpath.home.url"); GetPropertyAction getProp = new GetPropertyAction("gnu.classpath.home.url");
String vendor = System.getProperty ("gnu.classpath.vm.shortname"); String base = (String) AccessController.doPrivileged(getProp);
getProp = new GetPropertyAction("gnu.classpath.vm.shortname");
String vendor = (String) AccessController.doPrivileged(getProp);
// Try VM specific security file // Try VM specific security file
boolean loaded = loadProviders (base, vendor); boolean loaded = loadProviders (base, vendor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment