summaryrefslogtreecommitdiff
path: root/support/rrsync
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-20 01:04:12 +0000
committerWayne Davison <wayned@samba.org>2005-02-20 01:04:12 +0000
commit8b806ed3477007bf6ee96628abe2b28d1b2cda29 (patch)
tree006d5d4d72ffb7e87bd82c4af98a13c3184892b5 /support/rrsync
parent8e3ead09a3768d1b38f65c8e296903af5fbbbc42 (diff)
downloadrsync-8b806ed3477007bf6ee96628abe2b28d1b2cda29.tar.gz
Disallow --remove-sent-files with a read-only server.
Diffstat (limited to 'support/rrsync')
-rw-r--r--support/rrsync2
1 files changed, 2 insertions, 0 deletions
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;