X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.core%2Fsrc%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2Ftasks%2FSystemCall.java;h=27cc59d60becde843d57a73fdd8d2f71d7349463;hb=c4282a516108d936112fbd4b91291563ec30a5e4;hp=8f031847edaec1db4e6ee269fa05cb092318f0e9;hpb=a9b97cc33383ded70277f49aa287f84903334e70;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.core/src/org/argeo/slc/core/execution/tasks/SystemCall.java b/org.argeo.slc.core/src/org/argeo/slc/core/execution/tasks/SystemCall.java index 8f031847e..27cc59d60 100644 --- a/org.argeo.slc.core/src/org/argeo/slc/core/execution/tasks/SystemCall.java +++ b/org.argeo.slc.core/src/org/argeo/slc/core/execution/tasks/SystemCall.java @@ -54,8 +54,6 @@ import org.argeo.slc.core.test.SimpleResultPart; import org.argeo.slc.test.TestResult; import org.argeo.slc.test.TestStatus; import org.springframework.core.io.Resource; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; /** Execute an OS specific system call. */ public class SystemCall implements Runnable { @@ -98,7 +96,7 @@ public class SystemCall implements Runnable { private Boolean exceptionOnFailed = true; private Boolean mergeEnvironmentVariables = true; - private Authentication authentication; +// private Authentication authentication; private String osConsole = null; private String generateScript = null; @@ -115,7 +113,9 @@ public class SystemCall implements Runnable { // TODO make it more secure and robust, test only once private final String sudoPrompt = UUID.randomUUID().toString(); private String askPassProgram = "/usr/libexec/openssh/ssh-askpass"; + @SuppressWarnings("unused") private boolean firstLine = true; + @SuppressWarnings("unused") private CallbackHandler callbackHandler; /** Chroot to the this path (must not be empty) */ private String chroot = null; @@ -158,7 +158,7 @@ public class SystemCall implements Runnable { /** Executes the system call. */ public void run() { - authentication = SecurityContextHolder.getContext().getAuthentication(); +// authentication = SecurityContextHolder.getContext().getAuthentication(); // Manage streams Writer stdOutWriter = null; @@ -533,10 +533,10 @@ public class SystemCall implements Runnable { /** Log from the underlying streams. */ protected void log(String logLevel, String line) { // TODO optimize - if (SecurityContextHolder.getContext().getAuthentication() == null) { - SecurityContextHolder.getContext() - .setAuthentication(authentication); - } +// if (SecurityContextHolder.getContext().getAuthentication() == null) { +// SecurityContextHolder.getContext() +// .setAuthentication(authentication); +// } if ("ERROR".equals(logLevel)) log.error(line);