8000 feat(minimald): implement scaffolding for execution over ssh by twitchyliquid64 · Pull Request #281 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions crates/minimald/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tokio::{
};

use crate::{
ChannelConfig, RequestedPty,
ChannelConfig, RequestedPty, exec,
rpc::{self},
server::ServerStateHandle,
sftp,
Expand Down Expand Up @@ -176,7 +176,7 @@ impl Connection {
}

/// A thread-safe handle to the connection.
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct ConnectionHandle(Arc<Mutex<Connection>>);

impl ConnectionHandle {
Expand Down Expand Up @@ -341,8 +341,9 @@ impl russh::server::Handler for ConnectionHandler {
"Got exec_request on channel {id}: {:?}",
String::from_utf8(data.to_vec())
);
session.channel_failure(id)?; // TODO: handle exec request
Ok(())
let c = self.0.clone();
let s = c.0.lock().await.serv.clone();
exec::handle_exec(data, s, c, id, session).await
}

async fn shell_request(
Expand Down
Loading
Loading
0