X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/106a8ad918498850614791736f508dcb2244af56..6258626751eae37f2f6b469e3549f0744e1d3239:/support/rrsync diff --git a/support/rrsync b/support/rrsync index 88bf4f91..b552002d 100644 --- a/support/rrsync +++ b/support/rrsync @@ -31,6 +31,8 @@ die "Not invoked via sshd\n$Usage" unless defined $command; die "SSH_ORIGINAL_COMMAND='$command' is not rsync\n" unless $command =~ /^rsync\s/; die "$0 -ro: sending to read-only server not allowed\n" if $ro and $command !~ /^rsync --server --sender /; +die "$0 -ro: use of --remove-sent-files with read-only server not allowed\n" + if $ro and $command =~ /\s--remove-sent-files/; my ($cmd,$dir) = $command =~ /^(rsync\s+(?:-[-a-zA-Z]+\s+)+\.) ?("[^"]*"|[^\s"]*)$/; die "$0: invalid rsync-command syntax or options\n" if !defined $cmd;