mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Proactively work around bug 6276483 by removing SunPKCS11-Solaris security provider.
See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6276483 and http://hudson.gotdns.com/wiki/display/HUDSON/Solaris+Issue+6276483 git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15292 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
c397933f91
commit
5cf28bc2eb
2 files changed
+18
-3
No files matched your search
@@ -61,6 +61,7 @@ import java.net.URLClassLoader;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.security.Security;
|
||||
|
||||
/**
|
||||
* Entry point when Hudson is used as a webapp.
|
||||
@@ -101,6 +102,12 @@ public final class WebAppMain implements ServletContextListener {
|
||||
return;
|
||||
}
|
||||
|
||||
try {// remove Sun PKCS11 provider if present. See http://hudson.gotdns.com/wiki/display/HUDSON/Solaris+Issue+6276483
|
||||
Security.removeProvider("SunPKCS11-Solaris");
|
||||
} catch (SecurityException e) {
|
||||
// ignore this error.
|
||||
}
|
||||
|
||||
installLogger();
|
||||
|
||||
final File home = getHomeDir(event).getAbsoluteFile();
|
||||
|
||||
@@ -52,8 +52,8 @@ import java.util.List;
|
||||
import java.util.Collections;
|
||||
import java.util.ArrayList;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.Future;
|
||||
import java.security.Security;
|
||||
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
@@ -297,7 +297,7 @@ public class SlaveComputer extends Computer {
|
||||
copyJar(log, dst, PluginManagerInterceptor.class, "maven-interceptor");
|
||||
}
|
||||
|
||||
channel.call(new LogInstaller());
|
||||
channel.call(new SlaveInitializer());
|
||||
channel.call(new WindowsSlaveInstaller(remoteFs));
|
||||
|
||||
// update the data structure atomically to prevent others from seeing a channel that's not properly initialized yet
|
||||
@@ -491,12 +491,20 @@ public class SlaveComputer extends Computer {
|
||||
*/
|
||||
private static final RingBufferLogHandler SLAVE_LOG_HANDLER = new RingBufferLogHandler();
|
||||
|
||||
private static class LogInstaller implements Callable<Void,RuntimeException> {
|
||||
private static class SlaveInitializer implements Callable<Void,RuntimeException> {
|
||||
public Void call() {
|
||||
// avoid double installation of the handler
|
||||
Logger logger = Logger.getLogger("hudson");
|
||||
logger.removeHandler(SLAVE_LOG_HANDLER);
|
||||
logger.addHandler(SLAVE_LOG_HANDLER);
|
||||
|
||||
// remove Sun PKCS11 provider if present. See http://hudson.gotdns.com/wiki/display/HUDSON/Solaris+Issue+6276483
|
||||
try {
|
||||
Security.removeProvider("SunPKCS11-Solaris");
|
||||
} catch (SecurityException e) {
|
||||
// ignore this error.
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
Reference in new issue
Block a user