Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The slave launch thread is another background thread, and it should run like a super-user
- Loading branch information
Showing
2 changed files
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ | |
import javax.servlet.RequestDispatcher; | ||
import jenkins.model.Jenkins; | ||
import jenkins.slaves.JnlpSlaveAgentProtocol; | ||
import org.acegisecurity.Authentication; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
import org.kohsuke.stapler.StaplerRequest; | ||
import org.kohsuke.stapler.StaplerResponse; | ||
import org.kohsuke.stapler.QueryParameter; | ||
|
@@ -217,6 +218,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 | ||
This comment has been minimized.
Sorry, something went wrong.
jglick
Member
|
||
|
||
try { | ||
log.rewind(); | ||
try { | ||
|
Why the unused import?