X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/5d3e5f641d11b48426470c1f5e92cae31f1cea6f..4ecf3e067151e45dc7dead9862416722dcb4a20f:/support/rrsync diff --git a/support/rrsync b/support/rrsync index e1ae6ec8..26826319 100644 --- a/support/rrsync +++ b/support/rrsync @@ -39,6 +39,7 @@ die "$0: Restricted directory does not exist!\n" if $subdir ne '/' && !-d $subdi my $command = $ENV{SSH_ORIGINAL_COMMAND}; die "$0: Not invoked via sshd\n$Usage" unless defined $command; die "$0: SSH_ORIGINAL_COMMAND='$command' is not rsync\n" unless $command =~ s/^rsync\s+//; +die "$0: --server option is not first\n" unless $command =~ /^--server\s/; our $am_sender = $command =~ /^--server\s+--sender\s/; # Restrictive on purpose! die "$0 -ro: sending to read-only server not allowed\n" if $ro && !$am_sender; @@ -65,7 +66,7 @@ our %long_opt = ( 'compress-level' => 1, 'copy-dest' => 2, 'copy-unsafe-links' => 0, - 'daemon' => 0, + 'daemon' => -1, 'delay-updates' => 0, 'delete' => 0, 'delete-after' => 0, @@ -74,6 +75,7 @@ our %long_opt = ( 'delete-during' => 0, 'delete-excluded' => 0, 'existing' => 0, + 'fake-super' => 0, 'files-from' => 3, 'force' => 0, 'from0' => 0, @@ -84,6 +86,7 @@ our %long_opt = ( 'inplace' => 0, 'link-dest' => 2, 'list-only' => 0, + 'log-file' => 3, 'log-format' => 1, 'max-delete' => 1, 'max-size' => 1, @@ -110,6 +113,7 @@ our %long_opt = ( 'super' => 0, 'temp-dir' => 2, 'timeout' => 1, + 'use-qsort' => 0, ); ### END of options data produced by the cull_options script. ### @@ -139,7 +143,7 @@ while ($command =~ /((?:[^\s\\]+|\\.[^\s\\]*)+)/g) { if ($_ eq '.') { $in_options = 0; } else { - next if /^-$short_no_arg+(e\d+\.\d+)?$/o || /^-$short_with_num\d+$/o; + next if /^-$short_no_arg+(e\d*\.\w*)?$/o || /^-$short_with_num\d+$/o; my($opt,$arg) = /^--([^=]+)(?:=(.*))?$/; my $disabled;