Add the confine_ssh task

This is required by the drbackup stuff, which is required to migrate
Dist Git to ansible.
This commit is contained in:
Mathieu Bridon 2014-07-17 17:15:28 +02:00 committed by Kevin Fenzi
parent 9dd33b21dd
commit f60221e2aa
2 changed files with 22 additions and 0 deletions

View File

@ -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

6
tasks/confine_ssh.yml Normal file
View File

@ -0,0 +1,6 @@
---
- name: install the confine-ssh script
copy: >
src={{files}}/scripts/confine-ssh.sh
dest=/usr/local/bin/confine-ssh.sh
mode=0755