karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [karaf] branch master updated: KARAF-5569 Add CommandFactory to ssh server when sftp is disabled
Date Wed, 17 Jan 2018 06:52:48 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f91a09  KARAF-5569 Add CommandFactory to ssh server when sftp is disabled
0f91a09 is described below

commit 0f91a095aba0a7abfe8e5f9fe174811a6826c11b
Author: clockard <chris.lockard@connexta.com>
AuthorDate: Tue Jan 16 15:52:39 2018 -0700

    KARAF-5569 Add CommandFactory to ssh server when sftp is disabled
---
 shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
index 1deb9fe..bdd0aaf 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
@@ -175,6 +175,8 @@ public class Activator extends BaseActivator implements ManagedService
{
             server.setCommandFactory(new ScpCommandFactory.Builder().withDelegate(cmd ->
new ShellCommand(sessionFactory, cmd)).build());
             server.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory()));
             server.setFileSystemFactory(new VirtualFileSystemFactory(Paths.get(System.getProperty("karaf.base"))));
+        } else {
+            server.setCommandFactory(cmd -> new ShellCommand(sessionFactory, cmd));
         }
         server.setKeyPairProvider(keyPairProvider);
         server.setPasswordAuthenticator(authenticator);

-- 
To stop receiving notification emails like this one, please contact
['"commits@karaf.apache.org" <commits@karaf.apache.org>'].

Mime
View raw message