From: Gary Benson <gbenson@redhat.com>
To: mauve-patches@sources.redhat.com
Subject: FYI: Socket and ServerSocket throwpoint check tweaks
Date: Fri, 10 Nov 2006 11:30:00 -0000 [thread overview]
Message-ID: <20061110113033.GB3892@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
Hi all,
This commit fixes a couple of minor things in the throwpoint checks
for Socket and ServerSocket.
Cheers,
Gary
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2847 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1986
diff -u -r1.1986 ChangeLog
--- ChangeLog 9 Nov 2006 19:15:39 -0000 1.1986
+++ ChangeLog 10 Nov 2006 11:28:02 -0000
@@ -1,3 +1,12 @@
+2006-11-10 Gary Benson <gbenson@redhat.com>
+
+ * gnu/testlet/java/net/ServerSocket/security.java:
+ Always use localhost regardless of the actual hostname
+ of the address being listened on.
+
+ * gnu/testlet/java/net/Socket/security.java:
+ Removed an unused import.
+
2006-11-09 Tania Bento <tbento@redhat.com>
* gnu/testlet/javax/swing/JLabel/constructor.java: Added new tests.
Index: gnu/testlet/java/net/ServerSocket/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/ServerSocket/security.java,v
retrieving revision 1.1
diff -u -r1.1 security.java
--- gnu/testlet/java/net/ServerSocket/security.java 9 Oct 2006 14:55:17 -0000 1.1
+++ gnu/testlet/java/net/ServerSocket/security.java 10 Nov 2006 11:28:02 -0000
@@ -20,8 +20,8 @@
package gnu.testlet.java.net.ServerSocket;
-import java.net.InetAddress;
import java.net.BindException;
+import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketPermission;
@@ -39,9 +39,7 @@
harness.checkPoint("setup");
InetAddress inetaddr = InetAddress.getByName(null);
- String hostname = inetaddr.getHostName();
String hostaddr = inetaddr.getHostAddress();
- harness.check(!hostname.equals(hostaddr));
ServerSocket ssocket = new ServerSocket(0, 50, inetaddr);
int sport = ssocket.getLocalPort();
@@ -49,10 +47,10 @@
int cport = csocket.getLocalPort();
Permission[] checkListen80 = new Permission[] {
- new SocketPermission(hostname + ":80", "listen")};
+ new SocketPermission("localhost:80", "listen")};
Permission[] checkListen1024plus = new Permission[] {
- new SocketPermission(hostname + ":1024-", "listen")};
+ new SocketPermission("localhost:1024-", "listen")};
Permission[] checkAccept = new Permission[] {
new SocketPermission(hostaddr + ":" + cport, "accept")};
Index: gnu/testlet/java/net/Socket/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/Socket/security.java,v
retrieving revision 1.1
diff -u -r1.1 security.java
--- gnu/testlet/java/net/Socket/security.java 5 Oct 2006 14:44:55 -0000 1.1
+++ gnu/testlet/java/net/Socket/security.java 10 Nov 2006 11:28:02 -0000
@@ -27,7 +27,6 @@
import java.net.SocketException;
import java.net.SocketPermission;
import java.security.Permission;
-import java.util.PropertyPermission;
import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;
reply other threads:[~2006-11-10 11:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061110113033.GB3892@redhat.com \
--to=gbenson@redhat.com \
--cc=mauve-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).