diff options
author | Anthony Green <green@redhat.com> | 2006-01-15 03:00:21 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2006-01-15 03:00:21 +0000 |
commit | 9b36eaf68ef67beb424ae54cb56efd83560d107f (patch) | |
tree | 0e6186ac8a713161afdb9ad94c1db55c9529f5fe /libjava | |
parent | 5d1dcaa2c3846b2e189ab190e53c07d13d55673c (diff) | |
download | gcc-9b36eaf68ef67beb424ae54cb56efd83560d107f.tar.gz |
ServerSocket.java (accept): Remove bogus security check.
2006-01-14 Anthony Green <green@redhat.com>
* java/net/ServerSocket.java (accept): Remove bogus
security check.
(implAccept): Add FIXME comment.
From-SVN: r109719
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/classpath/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/classpath/java/net/ServerSocket.java | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index 85df787cc4d..75e139eec7f 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,9 @@ +2006-01-14 Anthony Green <green@redhat.com> + + * java/net/ServerSocket.java (accept): Remove bogus + security check. + (implAccept): Add FIXME comment. + 2005-12-27 Tom Tromey <tromey@redhat.com> * gnu/java/nio/SelectorImpl.java: Added import. 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 |