Skip to content

Commit

Permalink
Fix upgrade issue from SSHD
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Apr 30, 2024
1 parent 3ba3639 commit e8c1fd3
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
import org.apache.openejb.server.cli.CliRunnable;
import org.apache.sshd.server.Environment;
import org.apache.sshd.server.ExitCallback;
import org.apache.sshd.server.SessionAware;
import org.apache.sshd.server.channel.ChannelSession;
import org.apache.sshd.server.command.Command;
import org.apache.sshd.server.session.ServerSession;
import org.apache.sshd.server.session.ServerSessionAware;

import javax.security.auth.Subject;
import javax.security.auth.login.LoginContext;
Expand All @@ -31,7 +32,7 @@
import java.io.OutputStream;
import java.security.PrivilegedAction;

public class OpenEJBCommands extends CliRunnable implements Command, Runnable, SessionAware {
public class OpenEJBCommands extends CliRunnable implements Command, Runnable, ServerSessionAware {
private ExitCallback cbk;
private LoginContext loginContext;

Expand Down Expand Up @@ -64,11 +65,6 @@ public void setExitCallback(ExitCallback callback) {
cbk = callback;
}

@Override
public void start(Environment env) throws IOException {
start();
}

@Override
public void run() {
if (loginContext == null) {
Expand Down Expand Up @@ -102,5 +98,15 @@ public void setSession(final ServerSession session) {
setUsername(username);
loginContext = session.getAttribute(OpenEJBJaasPasswordAuthenticator.LOGIN_CONTEXT_KEY);
}

@Override
public void start(ChannelSession channelSession, Environment environment) throws IOException {
start();
}

@Override
public void destroy(ChannelSession channelSession) throws Exception {
destroy();
}
}

0 comments on commit e8c1fd3

Please sign in to comment.