mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8066709: Make some JDK system properties read only
Reviewed-by: lancea, sundar, bchristi, weijun, mchung, alanb, mullan
This commit is contained in:
parent
cad47f4a03
commit
4098f2560a
25 changed files with 215 additions and 46 deletions
|
@ -30,10 +30,11 @@ import java.io.BufferedOutputStream;
|
|||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
|
||||
import jdk.internal.util.StaticProperty;
|
||||
import sun.net.SocksProxy;
|
||||
import sun.net.spi.DefaultProxySelector;
|
||||
import sun.net.www.ParseUtil;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
/* import org.ietf.jgss.*; */
|
||||
|
||||
/**
|
||||
|
@ -178,7 +179,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
|
|||
userName = pw.getUserName();
|
||||
password = new String(pw.getPassword());
|
||||
} else {
|
||||
userName = GetPropertyAction.privilegedGetProperty("user.name");
|
||||
userName = StaticProperty.userName();
|
||||
}
|
||||
if (userName == null)
|
||||
return false;
|
||||
|
@ -1088,7 +1089,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
|
|||
userName = System.getProperty("user.name");
|
||||
} catch (SecurityException se) { /* swallow Exception */ }
|
||||
} else {
|
||||
userName = GetPropertyAction.privilegedGetProperty("user.name");
|
||||
userName = StaticProperty.userName();
|
||||
}
|
||||
return userName;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue