summaryrefslogtreecommitdiff
path: root/rsync-ssl.in
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2013-06-15 14:40:52 -0700
committerWayne Davison <wayned@samba.org>2013-06-15 16:40:10 -0700
commit70d4a945f7d1ab1aca2c3ca8535240fad4bdf06b (patch)
treeae7f7090c6f8726ebd5eb4e03d4c71c72a810c8b /rsync-ssl.in
parent0488a14b9930bf91719ac0f1d1c0c8770ca10646 (diff)
downloadrsync-70d4a945f7d1ab1aca2c3ca8535240fad4bdf06b.tar.gz
Support rsync daemon over SSL via stunnel.
Added the client rsync-ssl script and various client/daemon support files needed for talking to an rsync daemon over SSL on port 874 (no tls support). This uses an elegant stunnel setup that was detailed by dozzie (see the resources page) now that stunnel4 has improved command-spawning support. Also incorporates some tweaks by devzero (e.g. the nice no-tmpfile-config client-side code) and a few by me (including logging of the actual remote IP that came in to the stunnel process). This probably still needs a little work.
Diffstat (limited to 'rsync-ssl.in')
-rwxr-xr-xrsync-ssl.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/rsync-ssl.in b/rsync-ssl.in
new file mode 100755
index 00000000..da58d6af
--- /dev/null
+++ b/rsync-ssl.in
@@ -0,0 +1,12 @@
+#!/bin/bash
+# This script supports using stunnel to secure an rsync daemon connection.
+# Note that this requires at least version 4.x of stunnel.
+case "$@" in
+*rsync://*) ;;
+*::*) ;;
+*)
+ echo "You must use rsync-ssl with a daemon-style hostname." 0>&1
+ exit 1
+ ;;
+esac
+exec @bindir@/rsync --rsh=@bindir@/stunnel-rsync "${@}"