[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Wed Jan 10 01:57:14 UTC 2018


The branch, master has been updated
       via  7706303 Ignore --protect-args when already sent by client
      from  f5e8a17 Fix issue with earlier path-check (fixes "make check") and make a BOOL more explicit.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 7706303828fcde524222babb2833864a4bd09e07
Author: Jeriko One <jeriko.one at gmx.us>
Date:   Mon Nov 20 14:42:30 2017 -0800

    Ignore --protect-args when already sent by client
    
    In parse_arguments when --protect-args is encountered the function exits
    early. The caller is expected to check protect_args, and recall
    parse_arguments setting protect_args to 2. This patch prevents the
    client from resetting protect_args during the second pass of
    parse_arguments. This prevents parse_arguments returning early the
    second time before it's able to sanitize the arguments it received.

-----------------------------------------------------------------------

Summary of changes:
 options.c | 5 +++++
 1 file changed, 5 insertions(+)


Changeset truncated at 500 lines:

diff --git a/options.c b/options.c
index 64ec8b8..cb94ef0 100644
--- a/options.c
+++ b/options.c
@@ -1313,6 +1313,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
 	const char *arg, **argv = *argv_p;
 	int argc = *argc_p;
 	int opt;
+	int orig_protect_args = protect_args;
 
 	if (ref && *ref)
 		set_refuse_options(ref);
@@ -1934,6 +1935,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
 	if (fuzzy_basis > 1)
 		fuzzy_basis = basis_dir_cnt + 1;
 
+	/* Don't let the client reset protect_args if it was already processed */
+	if (orig_protect_args == 2 && am_server)
+		protect_args = orig_protect_args;
+
 	if (protect_args == 1 && am_server)
 		return 1;
 


-- 
The rsync repository.



More information about the rsync-cvs mailing list