From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3070 invoked by alias); 1 Oct 2006 17:36:03 -0000 Received: (qmail 3062 invoked by uid 22791); 1 Oct 2006 17:36:02 -0000 X-Spam-Check-By: sourceware.org Received: from mxout.hispeed.ch (HELO smtp.hispeed.ch) (62.2.95.247) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 01 Oct 2006 17:36:00 +0000 Received: from [192.168.0.192] (84-75-63-249.dclient.hispeed.ch [84.75.63.249]) by smtp.hispeed.ch (8.12.11.20060308/8.12.6/taifun-1.0) with ESMTP id k91HZv2n014978 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 1 Oct 2006 19:35:57 +0200 Message-ID: <451FFC83.8030105@gmx.ch> Date: Sun, 01 Oct 2006 17:36:00 -0000 From: Marco Trudel User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: java-patches@gcc.gnu.org Subject: Re: RFC: Untested Win32 InetAddress tweak References: <20060904141535.GA6537@redhat.com> In-Reply-To: <20060904141535.GA6537@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Status: Clean X-DCC-spamcheck-01.tornado.cablecom.ch-Metrics: smtp-06.tornado.cablecom.ch 1377; Body=1 Fuz1=1 Fuz2=1 X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2006-q4/txt/msg00003.txt.bz2 Hello Gary Gary Benson wrote: > Hi all, > > The last part of java.net.InetAddress.lookup (a native method) is the > same in both Posix and Win32 variants except for a security check that > was removed from the Posix variant in August 2004. The attached patch > removes this check from the Win32, synchronising the two. > > I don't have the ability to test this, so could someone try it for me? > Alternatively, is this a trivial enough change to just commit blind? Something must have went wrong. java/net/InetAddress.java was changed according this patch, java/net/natInetAddressWin32.cc has not. This leads to an error on compilation. Please commit the rest as well... Here's the link to the trunk head, you can see that the code is still there: http://gcc.gnu.org/viewcvs/trunk/libjava/java/net/natInetAddressWin32.cc?view=markup Marco > Cheers, > Gary > > > ------------------------------------------------------------------------ > > Index: ChangeLog > =================================================================== > --- ChangeLog (revision 116678) > +++ ChangeLog (working copy) > @@ -1,3 +1,9 @@ > +2006-09-04 Gary Benson > + > + * java/net/natInetAddressWin32.cc (lookup): Remove security > + check. > + * java/net/InetAddress.java (checkConnect): Removed. > + > 2006-09-01 Geoffrey Keating > > * testsuite/libjava.jni/jni.exp (gcj_jni_invocation_test_one): > Index: java/net/natInetAddressWin32.cc > =================================================================== > --- java/net/natInetAddressWin32.cc (revision 116678) > +++ java/net/natInetAddressWin32.cc (working copy) > @@ -94,13 +94,6 @@ > { > if (!all) > host = JvNewStringUTF (hptr->h_name); > - java::lang::SecurityException *ex = checkConnect (host); > - if (ex != NULL) > - { > - if (iaddr == NULL || iaddr->addr == NULL) > - throw ex; > - hptr = NULL; > - } > } > if (hptr == NULL) > { > Index: java/net/InetAddress.java > =================================================================== > --- java/net/InetAddress.java (revision 116678) > +++ java/net/InetAddress.java (working copy) > @@ -352,25 +352,6 @@ > return new InetAddress [count]; > } > > - /* Helper function due to a CNI limitation. */ > - private static SecurityException checkConnect (String hostname) > - { > - SecurityManager s = System.getSecurityManager(); > - > - if (s == null) > - return null; > - > - try > - { > - s.checkConnect (hostname, -1); > - return null; > - } > - catch (SecurityException ex) > - { > - return ex; > - } > - } > - > /** > * Returns the IP address of this object as a String. The address is in > * the dotted octet notation, for example, "127.0.0.1".