aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-03-19 16:44:11 -0700
committerWayne Davison <wayned@samba.org>2008-03-19 16:44:11 -0700
commite889e0c43bc6b55ff2c20091a66bb1676de5369f (patch)
tree3001cd6857be4f78828e986867c43177d5506423 /support
parent6e0bf4d840c8718e832bde6ffb34470f2167047d (diff)
downloadandroid_external_rsync-e889e0c43bc6b55ff2c20091a66bb1676de5369f.tar.gz
android_external_rsync-e889e0c43bc6b55ff2c20091a66bb1676de5369f.tar.bz2
android_external_rsync-e889e0c43bc6b55ff2c20091a66bb1676de5369f.zip
A couple more support/rrsync tweaks:
- Die if the --server option is not first on the command-line. - Don't allow the --daemon option by default.
Diffstat (limited to 'support')
-rw-r--r--support/rrsync3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/rrsync b/support/rrsync
index 6e1a6eb8..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,