karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject karaf git commit: [KARAF-3413]should also associate the role to run executeScript
Date Fri, 12 Dec 2014 09:09:11 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-3.0.x 5b8f91a96 -> 925e3bc8c


[KARAF-3413]should also associate the role to run executeScript


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/925e3bc8
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/925e3bc8
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/925e3bc8

Branch: refs/heads/karaf-3.0.x
Commit: 925e3bc8cb553f69de4f51ab4d2614187477b129
Parents: 5b8f91a
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Fri Dec 12 17:08:46 2014 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Fri Dec 12 17:08:46 2014 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/karaf/shell/ssh/ShellCommand.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/925e3bc8/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/ShellCommand.java
----------------------------------------------------------------------
diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/ShellCommand.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/ShellCommand.java
index 39bf3fa..b9cee14 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/ShellCommand.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/ShellCommand.java
@@ -98,10 +98,10 @@ public class ShellCommand implements Command, SessionAware {
                 Object result;
                 if (subject != null) {
                     try {
-                        String scriptFileName = System.getProperty(SHELL_INIT_SCRIPT);
-                        executeScript(scriptFileName, session);
                         result = JaasHelper.doAs(subject, new PrivilegedExceptionAction<Object>()
{
                             public Object run() throws Exception {
+                                String scriptFileName = System.getProperty(SHELL_INIT_SCRIPT);
+                                executeScript(scriptFileName, session);
                                 return session.execute(command);
                             }
                         });
@@ -160,4 +160,4 @@ public class ShellCommand implements Command, SessionAware {
         }
     }
 
-}
\ No newline at end of file
+}


Mime
View raw message