From e36f416c54f93678c83cd38bfc6b96ba32122f0a Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:50:30 +0200 Subject: [PATCH] sftp --- bin/cluelesshd/cluelesshd.toml | 2 ++ bin/cluelesshd/src/rpc.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/cluelesshd/cluelesshd.toml b/bin/cluelesshd/cluelesshd.toml index dc8b342..7f9d0b0 100644 --- a/bin/cluelesshd/cluelesshd.toml +++ b/bin/cluelesshd/cluelesshd.toml @@ -2,6 +2,8 @@ log_level = "info" [subsystem.sftp] +# can also: +# path = "/nix/store/03fwrvyf4gw1gps9nmyvrxl17i7287ln-openssh-9.7p1/libexec/sftp-server" path = "../../target/debug/cluelesshd-sftp-server" [net] diff --git a/bin/cluelesshd/src/rpc.rs b/bin/cluelesshd/src/rpc.rs index eedc2cf..5b3bd7b 100644 --- a/bin/cluelesshd/src/rpc.rs +++ b/bin/cluelesshd/src/rpc.rs @@ -356,12 +356,12 @@ impl Server { Some(child) => { let result = child.wait().await; - self.respond::( - result - .map(|status| status.code()) - .map_err(|err| err.to_string()), - ) - .await?; + let result = result + .map(|status| status.code()) + .map_err(|err| err.to_string()); + debug!(?result, "Child process exited"); + + self.respond::(result).await?; // implicitly drop stdio self.shell_process = None;