提交 4a71b011 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-15578]

The slave launch thread is another background thread, and it should run
like a super-user
上级 af7cd9bf
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Slave launch thread should have the background activitiy credential.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15578">issue 15578</a>)
<li class=bug>
“Build Now” link did not work for multijobs.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16974">issue 16974</a>)
......
......@@ -72,6 +72,7 @@ import javax.crypto.spec.SecretKeySpec;
import javax.servlet.RequestDispatcher;
import jenkins.model.Jenkins;
import jenkins.slaves.JnlpSlaveAgentProtocol;
import org.acegisecurity.Authentication;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.QueryParameter;
......@@ -217,6 +218,9 @@ public class SlaveComputer extends Computer {
public Object call() throws Exception {
// do this on another thread so that the lengthy launch operation
// (which is typical) won't block UI thread.
ACL.impersonate(ACL.SYSTEM); // background activity should run like a super user
try {
log.rewind();
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册