1
From: Wayne Davison <wayned@samba.org>
2
Date: Fri, 11 Jul 2008 16:34:28 +0000 (-0700)
3
Subject: If the user specifies --protocol=29, rsync will avoid sending an -e
4
X-Git-Url: http://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=29703623381265506d79aa71cecb71a77089e074;hp=7a2eca415b0d7f40618dd67aa30bafef810b3724
6
If the user specifies --protocol=29, rsync will avoid sending an -e
7
option to the server (which is only useful for protocols 30 and above
8
anyway). This gives the user an easy way to talk to a restricted
9
server that has overly restrictive option-checking.
12
diff --git a/options.c b/options.c
13
index a79c553..d534cec 100644
16
@@ -1838,22 +1838,28 @@ void server_options(char **args, int *argc_p)
20
- /* We make use of the -e option to let the server know about any
21
- * pre-release protocol version && some behavior flags. */
23
+ set_allow_inc_recurse();
25
+ /* Checking the pre-negotiated value allows --protocol=29 override. */
26
+ if (protocol_version >= 30) {
27
+ /* We make use of the -e option to let the server know about
28
+ * any pre-release protocol version && some behavior flags. */
30
#if SUBPROTOCOL_VERSION != 0
31
- if (protocol_version == PROTOCOL_VERSION) {
32
- x += snprintf(argstr+x, sizeof argstr - x,
33
- "%d.%d", PROTOCOL_VERSION, SUBPROTOCOL_VERSION);
35
+ if (protocol_version == PROTOCOL_VERSION) {
36
+ x += snprintf(argstr+x, sizeof argstr - x,
38
+ PROTOCOL_VERSION, SUBPROTOCOL_VERSION);
42
- set_allow_inc_recurse();
43
- if (allow_inc_recurse)
46
+ if (allow_inc_recurse)
48
#if defined HAVE_LUTIMES && defined HAVE_UTIMES
56
if (x > (int)sizeof argstr) { /* Not possible... */