public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [cp-patches] Patch: remove bogus ServerSocket security check
       [not found] ` <m3hd8v9eq4.fsf@localhost.localdomain>
@ 2006-01-15  3:17   ` Anthony Green
  0 siblings, 0 replies; only message in thread
From: Anthony Green @ 2006-01-15  3:17 UTC (permalink / raw)
  To: tromey; +Cc: java-patches, classpath-patches

On Tue, 2005-12-27 at 00:33 -0700, Tom Tromey wrote:
> Anthony> Ok to apply?
> 
> Really the FIXME belongs in implAccept, IMO.
> Otherwise ok.

Thanks.  I've applied this patch to Classpath, as well as the GCC trunk
and 4.1 branch.


2006-01-14  Anthony Green  <green@redhat.com>

        * java/net/ServerSocket.java (accept): Remove bogus
        security check.
	(implAccept): Add FIXME comment.


--- classpath/java/net/ServerSocket.java~	2005-11-16 01:03:51.000000000 -0800
+++ classpath/java/net/ServerSocket.java	2006-01-14 16:18:39.000000000 -0800
@@ -314,11 +314,6 @@
    */
   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 @@
     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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-15  3:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1135652759.3588.79.camel@localhost.localdomain>
     [not found] ` <m3hd8v9eq4.fsf@localhost.localdomain>
2006-01-15  3:17   ` [cp-patches] Patch: remove bogus ServerSocket security check Anthony Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).