mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-24 06:38:15 -04:00
Disallow --remove-sent-files with a read-only server.
This commit is contained in:
1 parent
8e3ead09a3
commit
8b806ed347
1 file changed
+2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user