summaryrefslogtreecommitdiffstats
path: root/files/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'files/scripts')
-rw-r--r--files/scripts/confine-ssh.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/files/scripts/confine-ssh.sh b/files/scripts/confine-ssh.sh
new file mode 100644
index 000000000..07a448fc4
--- /dev/null
+++ b/files/scripts/confine-ssh.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Confine ssh commands
+case "$SSH_ORIGINAL_COMMAND" in
+*\&*)
+echo "Rejected"
+;;
+*\;*)
+echo "Rejected"
+;;
+rsync\ --server\ --sender*)
+$SSH_ORIGINAL_COMMAND
+;;
+*)
+echo "Rejected"
+;;
+esac