summaryrefslogtreecommitdiff
path: root/support/rrsync
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-04-24 16:19:16 +0000
committerWayne Davison <wayned@samba.org>2005-04-24 16:19:16 +0000
commita234bca4ef045bb34532c978642acb733942cfea (patch)
tree80f8b4c6094eb33fe0e6c7bdada21834e1fe7384 /support/rrsync
parent42e9c7eb565a6084d5a11c1808f5837babd7955b (diff)
downloadrsync-a234bca4ef045bb34532c978642acb733942cfea.tar.gz
Reject any --remove-* options when read-only, just in case there
are new ones added in the future.
Diffstat (limited to 'support/rrsync')
-rw-r--r--support/rrsync4
1 files changed, 2 insertions, 2 deletions
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;