Merge branch 'SECURITY-144' into SECURITY-144-rc

This commit is contained in:
Jesse Glick committed 2014-10-20 08:57:11 -04:00
commit 97b2f931ae
36 files changed
+362 -47

No files matched your search

+12 -1
View File
@@ -629,7 +629,7 @@ public final class FilePath implements Serializable {
act(new SecureFileCallable<Void>() {
private static final long serialVersionUID = 1L;
public Void invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
writing(f);
symlinking(f);
Util.createSymlink(f.getParentFile(),target,f.getName(),listener);
return null;
}
@@ -2755,6 +2755,17 @@ public final class FilePath implements Serializable {
return f;
}
/**
* Pass through 'f' after ensuring that we can create that symlink.
*/
private File symlinking(File f) {
FilePathFilter filter = filterNonNull();
if (!f.exists())
filter.create(f);
filter.symlink(f);
return f;
}
/**
* Pass through 'f' after ensuring that we can delete that file.
*/