summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2013-06-02 15:53:40 -0700
committerWayne Davison <wayned@samba.org>2013-06-02 15:54:48 -0700
commitd6df07392e4bbdd3056c501fc047e5a1ff45a371 (patch)
tree8a33f556c7d5ac94e621e5f7ce7a9567afbfdf6d
parentd9ca1e49904b2b8506a84b630097b42212356df1 (diff)
downloadrsync-d6df07392e4bbdd3056c501fc047e5a1ff45a371.tar.gz
rsync-d6df07392e4bbdd3056c501fc047e5a1ff45a371.tar.bz2
rsync-d6df07392e4bbdd3056c501fc047e5a1ff45a371.zip
Fix module-name splitting with --protect-args.
Fixes bug 8838.
-rw-r--r--t_stub.c1
-rw-r--r--util.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/t_stub.c b/t_stub.c
index 637e0d55..013c09d1 100644
--- a/t_stub.c
+++ b/t_stub.c
@@ -23,6 +23,7 @@
int modify_window = 0;
int preallocate_files = 0;
+int protect_args = 0;
int module_id = -1;
int relative_paths = 0;
int module_dirlen = 0;
diff --git a/util.c b/util.c
index 0799dff5..d0dee734 100644
--- a/util.c
+++ b/util.c
@@ -26,6 +26,7 @@
#include "inums.h"
extern int module_id;
+extern int protect_args;
extern int modify_window;
extern int relative_paths;
extern int preserve_times;
@@ -759,6 +760,11 @@ void glob_expand_module(char *base1, char *arg, char ***argv_p, int *argc_p, int
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");