X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/8b806ed3477007bf6ee96628abe2b28d1b2cda29..782d1091213df611767787a88365c32427afe9ec:/support/rrsync diff --git a/support/rrsync b/support/rrsync index b552002d..1e54b3d2 100644 --- a/support/rrsync +++ b/support/rrsync @@ -31,8 +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/; +die "$0 -ro: use of $1 with read-only server not allowed\n" + if $ro and $command =~ /\s(--remove-\S+)/; my ($cmd,$dir) = $command =~ /^(rsync\s+(?:-[-a-zA-Z]+\s+)+\.) ?("[^"]*"|[^\s"]*)$/; die "$0: invalid rsync-command syntax or options\n" if !defined $cmd;