From: Wayne Davison Date: Sun, 20 Feb 2005 01:04:12 +0000 (+0000) Subject: Disallow --remove-sent-files with a read-only server. X-Git-Tag: v2.6.4pre1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b806ed3477007bf6ee96628abe2b28d1b2cda29;p=thirdparty%2Frsync.git Disallow --remove-sent-files with a read-only server. --- 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;