Run ThreadPoolForRemoting as SYSTEM
@@ -30,7 +30,6 @@ import hudson.EnvVars;
import hudson.Extension;
import hudson.Launcher.ProcStarter;
import hudson.slaves.Cloud;
-import jenkins.util.SystemProperties;
import hudson.Util;
import hudson.cli.declarative.CLIResolver;
import hudson.console.AnnotatedLargeText;
@@ -65,7 +64,9 @@ import hudson.util.Futures;
import hudson.util.NamingThreadFactory;
import jenkins.model.Jenkins;
import jenkins.util.ContextResettingExecutorService;
+import jenkins.util.SystemProperties;
import jenkins.security.MasterToSlaveCallable;
+import jenkins.security.ImpersonatingExecutorService;
import org.apache.commons.lang.StringUtils;
import org.jenkins.ui.icon.Icon;
@@ -1352,9 +1353,11 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
}
public static final ExecutorService threadPoolForRemoting = new ContextResettingExecutorService(
+ new ImpersonatingExecutorService(
Executors.newCachedThreadPool(
new ExceptionCatchingThreadFactory(
- new NamingThreadFactory(new DaemonThreadFactory(), "Computer.threadPoolForRemoting"))));
+ new NamingThreadFactory(
+ new DaemonThreadFactory(), "Computer.threadPoolForRemoting"))), ACL.SYSTEM));
//
//
