Skip to content

Commit

Permalink
[FIXED JENKINS-15578]
Browse files Browse the repository at this point in the history
The slave launch thread is another background thread, and it should run
like a super-user

(cherry picked from commit 4a71b01)

Conflicts:
	changelog.html
  • Loading branch information
kohsuke authored and olivergondza committed Sep 24, 2013
1 parent 39a7f51 commit a799c7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/java/hudson/slaves/SlaveComputer.java
Expand Up @@ -71,6 +71,7 @@
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;
Expand Down Expand Up @@ -214,6 +215,9 @@ protected Future<?> _connect(boolean forceReconnect) {
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 {
Expand Down

0 comments on commit a799c7f

Please sign in to comment.