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 (cherry picked from commit 925e3bc8cb553f69de4f51ab4d2614187477b129)
Date Fri, 12 Dec 2014 09:13:09 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 82af9304b -> 4aa6cdc45


[KARAF-3413]should also associate the role to run executeScript
(cherry picked from commit 925e3bc8cb553f69de4f51ab4d2614187477b129)


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

Branch: refs/heads/master
Commit: 4aa6cdc457d29caa29c08f26bca4dc9529533bf1
Parents: 82af930
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:10:01 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/4aa6cdc4/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 b129c20..e036751 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
@@ -103,10 +103,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);
                             }
                         });
@@ -166,4 +166,4 @@ public class ShellCommand implements Command, SessionAware {
         }
     }
 
-}
\ No newline at end of file
+}


Mime
View raw message