merged the RC branch

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18184 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-05-18 17:57:50 +00:00
1 parent 772d77d425
commit 84d466ff5d
17 files changed
+87 -17

No files matched your search

@@ -66,6 +66,15 @@ public class DownloadService extends PageDecorator {
return null;
}
/**
* Represents a periodically updated JSON data file obtained from a remote URL.
*
* <p>
* This meachanism is one of the basis of the update center, which involves in fetching
* up-to-date data file.
*
* @since 1.305
*/
public static abstract class Downloadable implements ExtensionPoint {
private final String id;
private final String url;
@@ -167,6 +167,14 @@ public abstract class SecurityRealm implements Describable<SecurityRealm>, Exten
return "login";
}
/**
* Returns true if this {@link SecurityRealm} supports an logout operation.
* @since 1.307
*/
public boolean canLogOut() {
return true;
}
/**
* Returns true if this {@link SecurityRealm} allows online sign-up.
* This creates a hyperlink that redirects users to <tt>CONTEXT_ROOT/signUp</tt>,
@@ -28,10 +28,14 @@ import hudson.Extension;
import hudson.FilePath;
import hudson.FilePath.FileCallable;
import hudson.Util;
import hudson.Functions;
import hudson.model.Node;
import hudson.model.TaskListener;
import hudson.model.Hudson;
import hudson.remoting.VirtualChannel;
import hudson.util.FormValidation;
import hudson.util.jna.GNUCLibrary;
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
@@ -40,6 +44,7 @@ import java.net.URL;
import java.net.URLConnection;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.jvnet.animal_sniffer.IgnoreJRERequirement;
/**
* Installs a tool into the Hudson working area by downloading and unpacking a ZIP file.
@@ -117,12 +122,17 @@ public class ZipExtractionInstaller extends ToolInstaller {
private static class ChmodRecAPlusX implements FileCallable<Void> {
private static final long serialVersionUID = 1L;
public Void invoke(File d, VirtualChannel channel) throws IOException {
process(d);
if(!Hudson.isWindows())
process(d);
return null;
}
@IgnoreJRERequirement
private void process(File f) {
if (f.isFile()) {
f.setExecutable(true, false); // XXX JDK 6-specific, use FilePath.chmod instead
if(Functions.isMustangOrAbove())
f.setExecutable(true, false);
else
GNUCLibrary.LIBC.chmod(f.getAbsolutePath(),0755);
} else {
File[] kids = f.listFiles();
if (kids != null) {