diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2005-09-20 20:00:08 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2005-09-20 20:00:08 +0000 |
commit | 87b310dbc28f684f7cf40e04a70953e8acaccbed (patch) | |
tree | a0a654416131176f2dea1f4e4a1a8b6cdb8a6f84 /java/jdk16/files/patch-j2se-jar-Main.java | |
parent | Install rc sript with ".sample" postfix so it does not get executed by (diff) |
. Update to patchset 2:
. Many patches are now unnecessary as they are included in the new
patchset.
. The browser plugin and Java Web Start is enabled on i386 (there are
64 bit issues with both the plugin and Mozilla/Firefox which prevent
enabling it on amd64).
. Update the amount of disk space needed.
. Update the status of the port.
. Disable building the shared class data archive. This broke the build
on amd64 and appears to also be problematic on some i386 versions
(4.11 is broken at least). It will reappear in future, probably
initially on a limited set of FreeBSD versions and architectures
(6.0/i386 is reported to work).
Reviewed by: freebsd-java@
Approved by: maintainer timeout (1 week)
Notes
Notes:
svn path=/head/; revision=143246
Diffstat (limited to 'java/jdk16/files/patch-j2se-jar-Main.java')
-rw-r--r-- | java/jdk16/files/patch-j2se-jar-Main.java | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/java/jdk16/files/patch-j2se-jar-Main.java b/java/jdk16/files/patch-j2se-jar-Main.java deleted file mode 100644 index eaba6461ff01..000000000000 --- a/java/jdk16/files/patch-j2se-jar-Main.java +++ /dev/null @@ -1,58 +0,0 @@ -$FreeBSD$ - ---- ../../j2se/src/share/classes/sun/tools/jar/Main.java 8 Nov 2004 22:27:32 -0000 1.1.1.1 -+++ ../../j2se/src/share/classes/sun/tools/jar/Main.java 20 Apr 2005 16:50:17 -0000 -@@ -31,6 +31,7 @@ - Hashtable filesTable = new Hashtable(); - Vector paths = new Vector(); - Vector v; -+ String cwd; - CRC32 crc32 = new CRC32(); - /* cflag: create - * uflag: update -@@ -670,6 +671,19 @@ - * Extracts specified entries from JAR file. - */ - void extract(InputStream in, String files[]) throws IOException { -+ // Current working directory -+ -+ cwd = System.getProperty("user.dir"); -+ if (cwd == null) { -+ fatalError(getMsg("error.no.cwd")); -+ } -+ cwd = (new File(cwd)).getCanonicalPath(); -+ if (!cwd.endsWith(File.separator)) { -+ cwd += File.separator; -+ } -+ -+ // Extract the files -+ - ZipInputStream zis = new ZipInputStream(in); - ZipEntry e; - while ((e = zis.getNextEntry()) != null) { -@@ -694,6 +708,10 @@ - void extractFile(ZipInputStream zis, ZipEntry e) throws IOException { - String name = e.getName(); - File f = new File(e.getName().replace('/', File.separatorChar)); -+ if (!f.getCanonicalPath().startsWith(cwd)) { -+ output(formatMsg("out.ignore.entry", name)); -+ return; -+ } - if (e.isDirectory()) { - if (!f.exists() && !f.mkdirs() || !f.isDirectory()) { - throw new IOException(formatMsg("error.create.dir", f.getPath())); -@@ -704,6 +722,10 @@ - } else { - if (f.getParent() != null) { - File d = new File(f.getParent()); -+ if (!d.getCanonicalPath().startsWith(cwd)) { -+ output(formatMsg("out.ignore.entry", name)); -+ return; -+ } - if (!d.exists() && !d.mkdirs() || !d.isDirectory()) { - throw new IOException(formatMsg("error.create.dir", d.getPath())); - } -Index: j2se/src/share/classes/sun/tools/jar/resources/jar.properties -=================================================================== -RCS file: /var/jcvs/javasrc_1_5_scsl/j2se/src/share/classes/sun/tools/jar/resources/jar.properties,v -retrieving revision 1.1.1.1 |