From 6b4d286fd53f90ff2c395a974ccee706bd04a1be Mon Sep 17 00:00:00 2001 From: green Date: Sun, 15 Jan 2006 03:00:21 +0000 Subject: 2006-01-14 Anthony Green * java/net/ServerSocket.java (accept): Remove bogus security check. (implAccept): Add FIXME comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109719 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/classpath/java/net/ServerSocket.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libjava/classpath/java') diff --git a/libjava/classpath/java/net/ServerSocket.java b/libjava/classpath/java/net/ServerSocket.java index afc861403a1..aa2fc0fb7b6 100644 --- a/libjava/classpath/java/net/ServerSocket.java +++ b/libjava/classpath/java/net/ServerSocket.java @@ -314,11 +314,6 @@ public class ServerSocket */ public Socket accept() throws IOException { - SecurityManager sm = System.getSecurityManager(); - if (sm != null) - sm.checkAccept(impl.getInetAddress().getHostAddress(), - impl.getLocalPort()); - Socket socket = new Socket(); try @@ -360,6 +355,9 @@ public class ServerSocket if (isClosed()) throw new SocketException("ServerSocket is closed"); + // FIXME: Add a security check to make sure we're allowed to + // connect to the remote host. + // The Sun spec says that if we have an associated channel and // it is in non-blocking mode, we throw an IllegalBlockingModeException. // However, in our implementation if the channel itself initiated this -- cgit v1.2.1