csomh / rpms / rsync

Forked from rpms/rsync 3 years ago
Clone

Blame SOURCES/rsync-3.1.0-protect_args.patch

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