summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-07-29 22:57:39 -0400
committerJune McEnroe <june@causal.agency>2019-07-29 22:57:39 -0400
commit5a235b5660ffd2b05d8bb1c5b812f52951fe1311 (patch)
treea3e8765bcbe36e48ac74b34d2445311ccdfb9071
parentRename wrapper to dispatch (diff)
downloadstream-5a235b5660ffd2b05d8bb1c5b812f52951fe1311.tar.gz
stream-5a235b5660ffd2b05d8bb1c5b812f52951fe1311.zip
Pass original command to dispatch
-rw-r--r--dispatch.c2
-rw-r--r--sshd_config2
2 files changed, 2 insertions, 2 deletions
diff --git a/dispatch.c b/dispatch.c
index b3aaf28..137613e 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -20,5 +20,5 @@
 #include <sysexits.h>
 
 int main(void) {
-	// TODO: Grab SSH_ORIGINAL_COMMAND, check isatty(3).
+	// TODO: Validate argv, check isatty(3), exec.
 }
diff --git a/sshd_config b/sshd_config
index f7a3ea6..9eb6737 100644
--- a/sshd_config
+++ b/sshd_config
@@ -4,7 +4,7 @@ Match User stream
     PasswordAuthentication yes
     PermitEmptyPasswords yes
     ChrootDirectory /home/stream
-    ForceCommand wrapper
+    ForceCommand dispatch $SSH_ORIGINAL_COMMAND
 
     AllowAgentForwarding no
     AllowTcpForwarding no