summaryrefslogtreecommitdiff
path: root/extra/rssh/rsync.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/rssh/rsync.patch')
-rw-r--r--extra/rssh/rsync.patch33
1 files changed, 15 insertions, 18 deletions
diff --git a/extra/rssh/rsync.patch b/extra/rssh/rsync.patch
index cafd6c54b..7d0a51195 100644
--- a/extra/rssh/rsync.patch
+++ b/extra/rssh/rsync.patch
@@ -1,6 +1,6 @@
-diff -aur old//util.c new//util.c
---- old//util.c 2010-08-01 15:07:00.000000000 +0200
-+++ new//util.c 2010-11-25 18:16:24.086709600 +0100
+diff -Naur old/util.c new/util.c
+--- old/util.c 2012-08-01 13:48:47.803620731 +1000
++++ new/util.c 2012-08-01 13:55:13.622614598 +1000
@@ -56,6 +56,7 @@
#ifdef HAVE_LIBGEN_H
#include <libgen.h>
@@ -9,8 +9,8 @@ diff -aur old//util.c new//util.c
/* LOCAL INCLUDES */
#include "pathnames.h"
-@@ -187,6 +188,33 @@
- }
+@@ -192,6 +193,33 @@
+
/*
+ * check_rsync_e() - take the command line passed to rssh and look for a -e
@@ -41,17 +41,14 @@ diff -aur old//util.c new//util.c
+
+/*
* check_command_line() - take the command line passed to rssh, and verify
- * that the specified command is one the user is
- * allowed to run. Return the path of the command
-@@ -230,9 +258,9 @@
+ * that the specified command is one the user is
+ * allowed to run and validate the arguments. Return the
+@@ -211,7 +239,7 @@
+ }
+
+ if ( check_command(*cl, opts, PATH_CVS, RSSH_ALLOW_CVS) ){
+- if ( opt_filter(cl, 'e') ) return NULL;
++ if ( opt_filter(cl, 'e') && !check_rsync_e(cl) ) return NULL;
+ return PATH_CVS;
+ }
- if ( check_command(cl, opts, PATH_RSYNC, RSSH_ALLOW_RSYNC) ){
- /* filter -e option */
-- if ( opt_exist(cl, 'e') ){
-+ if ( opt_exist(cl, 'e') && !check_rsync_e(cl) ){
- fprintf(stderr, "\ninsecure -e option not allowed.");
-- log_msg("insecure -e option in rdist command line!");
-+ log_msg("insecure -e option in rsync command line!");
- return NULL;
- }
-