classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Patch: remove bogus ServerSocket security check


From: Anthony Green
Subject: [cp-patches] Patch: remove bogus ServerSocket security check
Date: Mon, 26 Dec 2005 19:05:59 -0800

This patch removes a bogus security check from ServerSocket.accept(),
and replaces it with a request to implement a proper check.  Once
applied I will file a bug report for our records.

This patch, along with all the other patches I've posted today, plus a
libgcj specific patch I posted, plus a number of Azureus tweaks let
Azureus start sharing files using the bittorrent protocol.  It's still
not working, but at least they connect and start trading bits.  There's
still more debugging to do.

Ok to apply?

AG



2005-12-26  Anthony Green  <address@hidden>

        * java/net/ServerSocket.java (accept): Remove bogus
        security check.

Index: java/net/ServerSocket.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/net/ServerSocket.java,v
retrieving revision 1.43
diff -u -r1.43 ServerSocket.java
--- java/net/ServerSocket.java  9 Oct 2005 22:05:47 -0000       1.43
+++ java/net/ServerSocket.java  27 Dec 2005 02:59:51 -0000
@@ -314,10 +314,8 @@
    */
   public Socket accept() throws IOException
   {
-    SecurityManager sm = System.getSecurityManager();
-    if (sm != null)
-      sm.checkAccept(impl.getInetAddress().getHostAddress(),
-                     impl.getLocalPort());
+    // FIXME: Add security check to make sure we're allowed to connect
+    // to remote host.
 
     Socket socket = new Socket();
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]