diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-01-17 17:15:47 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-01-17 17:15:47 +0000 |
commit | 7897ccbd4dd3449a0c25f35282720d158d23e415 (patch) | |
tree | 4a3bb95749aa678c78b7e815aef2350fbc6c8e06 /libjava/classpath/java/net/ServerSocket.java | |
parent | ca93945f297de76774958761e969139d53a7dd57 (diff) |
svn merge -r109401:109815 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_1-branch@109828 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/net/ServerSocket.java')
-rw-r--r-- | libjava/classpath/java/net/ServerSocket.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libjava/classpath/java/net/ServerSocket.java b/libjava/classpath/java/net/ServerSocket.java index afc861403a1..2b889531a7c 100644 --- a/libjava/classpath/java/net/ServerSocket.java +++ b/libjava/classpath/java/net/ServerSocket.java @@ -1,5 +1,5 @@ /* ServerSocket.java -- Class for implementing server side sockets - Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 + Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -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 |