@@ -278,7 +278,6 @@ Matthew Warman | |||||
Matthew Watson | Matthew Watson | ||||
Matthew Yanos | Matthew Yanos | ||||
Matthias Bhend | Matthias Bhend | ||||
Michael Barker | |||||
Michael Bayne | Michael Bayne | ||||
Michael Clarke | Michael Clarke | ||||
Michael Davey | Michael Davey | ||||
@@ -27,11 +27,6 @@ Fixed bugs: | |||||
an incorrect compression level for a zip entry. This is now fixed. | an incorrect compression level for a zip entry. This is now fixed. | ||||
Bugzilla Report 62686 | Bugzilla Report 62686 | ||||
* A filesystem "loop" caused due to symbolic links could trigger an | |||||
out of memory error in the org.apache.tools.ant.DirectoryScanner | |||||
This has now been fixed. | |||||
Bugzilla Report 62849 | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
* generatekey task now supports SubjectAlternativeName during key | * generatekey task now supports SubjectAlternativeName during key | ||||
@@ -1155,10 +1155,6 @@ | |||||
<first>Matthias</first> | <first>Matthias</first> | ||||
<last>Bhend</last> | <last>Bhend</last> | ||||
</name> | </name> | ||||
<name> | |||||
<first>Michael</first> | |||||
<last>Barker</last> | |||||
</name> | |||||
<name> | <name> | ||||
<first>Michael</first> | <first>Michael</first> | ||||
<last>Bayne</last> | <last>Bayne</last> | ||||
@@ -38,9 +38,4 @@ | |||||
<touch file="${output}/alpha/beta/gamma/gamma.xml"/> | <touch file="${output}/alpha/beta/gamma/gamma.xml"/> | ||||
</target> | </target> | ||||
<target name="symlink-nested-setup" depends="setUp"> | |||||
<symlink link="${output}/alpha/beta/gamma/beta-link" resource="${output}/alpha/beta"/> | |||||
<touch file="${output}/alpha/beta/gamma/gamma.xml"/> | |||||
</target> | |||||
</project> | </project> |
@@ -1237,18 +1237,6 @@ public class DirectoryScanner | |||||
final String name = vpath + newFile; | final String name = vpath + newFile; | ||||
final TokenizedPath newPath = new TokenizedPath(path, newFile); | final TokenizedPath newPath = new TokenizedPath(path, newFile); | ||||
final File file = new File(dir, newFile); | final File file = new File(dir, newFile); | ||||
try { | |||||
// check if it's a filesystem "loop" due to symbolic links | |||||
if (FileUtils.getFileUtils().isLeadingPath(file.getAbsoluteFile(), | |||||
dir.getAbsoluteFile(), true)) { | |||||
continue; | |||||
} | |||||
} catch (IOException e) { | |||||
System.err.println("Failed to determine if " + file + " causes a " + | |||||
"filesystem loop due to symbolic link; continuing"); | |||||
} | |||||
final String[] children = file.list(); | final String[] children = file.list(); | ||||
if (children == null || (children.length == 0 && file.isFile())) { | if (children == null || (children.length == 0 && file.isFile())) { | ||||
if (isIncluded(newPath)) { | if (isIncluded(newPath)) { | ||||
@@ -815,19 +815,7 @@ public class Delete extends MatchingTask { | |||||
} | } | ||||
for (String s : list) { | for (String s : list) { | ||||
File f = new File(d, s); | File f = new File(d, s); | ||||
boolean isFsLoop = false; | |||||
try { | |||||
isFsLoop = Files.isSymbolicLink(f.toPath()) && | |||||
FileUtils.getFileUtils().isLeadingPath(f.getAbsoluteFile(), | |||||
d.getAbsoluteFile(), true); | |||||
} catch (IOException e) { | |||||
log("Failed to check if " + f + " causes a filesystem loop due to " + | |||||
"symbolic link; continuing"); | |||||
} | |||||
if (f.isDirectory() && !isFsLoop) { | |||||
if (f.isDirectory()) { | |||||
removeDir(f); | removeDir(f); | ||||
} else { | } else { | ||||
log("Deleting " + f.getAbsolutePath(), quiet ? Project.MSG_VERBOSE : verbosity); | log("Deleting " + f.getAbsolutePath(), quiet ? Project.MSG_VERBOSE : verbosity); | ||||
@@ -130,20 +130,6 @@ public class DirectoryScannerTest { | |||||
new String[] {"alpha/beta/gamma"}); | new String[] {"alpha/beta/gamma"}); | ||||
} | } | ||||
@Test | |||||
public void testAllowRecursiveSymlinks() { | |||||
assumeTrue("Current system does not support Symlinks", supportsSymlinks); | |||||
buildRule.getProject().executeTarget("symlink-nested-setup"); | |||||
DirectoryScanner ds = new DirectoryScanner(); | |||||
ds.setBasedir(new File(buildRule.getProject().getProperty("output"))); | |||||
ds.setIncludes(new String[] {"alpha/beta/gamma/"}); | |||||
ds.scan(); | |||||
compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"}, | |||||
new String[] {"alpha/beta/gamma"}); | |||||
} | |||||
@Test | @Test | ||||
public void testProhibitSymlinks() { | public void testProhibitSymlinks() { | ||||
assumeTrue("Current system does not support Symlinks", supportsSymlinks); | assumeTrue("Current system does not support Symlinks", supportsSymlinks); | ||||