Blob Blame History Raw
--- ./util.c	2011-04-23 00:51:55.000000000 +0200
+++ ./util.c	2013-06-14 15:10:21.381102268 +0200
@@ -25,6 +25,7 @@
 
 extern int verbose;
 extern int module_id;
+extern int protect_args;
 extern int modify_window;
 extern int relative_paths;
 extern int preserve_times;
@@ -719,6 +720,11 @@
 	if (strncmp(arg, base, base_len) == 0)
 		arg += base_len;
 
+        if (protect_args) {
+               glob_expand(arg, argv_p, argc_p, maxargs_p);
+               return;
+        }
+        
 	if (!(arg = strdup(arg)))
 		out_of_memory("glob_expand_module");
 
--- rsync-3.0.9.orig/t_unsafe.c
+++ rsync-3.0.9/t_unsafe.c
@@ -28,6 +28,7 @@ int am_root = 0;
 int read_only = 0;
 int list_only = 0;
 int verbose = 0;
+int protect_args = 0;
 int preserve_perms = 0;
 int preserve_executability = 0;