~ubuntu-branches/ubuntu/natty/rsync/natty

« back to all changes in this revision

Viewing changes to debian/patches/proto29--e-option.diff

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Daniel T. Chen, Dustin Kirkland
  • Date: 2008-07-25 23:52:06 UTC
  • mfrom: (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080725235206-rovkro4owknc0l2j
Tags: 3.0.3-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Remove stop links from rc0 and rc6.
    (and use update-rc.d multiuser instead of defaults). (TearDown spec)
  - depend on sys-rc to accomodate the TearDown changes.

[Daniel T. Chen]
* Adhere to update-rc.d multiuser deprecation as per
  https://lists.ubuntu.com/archives/ubuntu-devel-announce/2008-June/000430.html
  and
  https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-July/004662.html
  - debian/control: Drop sysv-rc versioned dependency,
  - debian/init.d:   Modify Default-Stop LSB header,
  - debian/postinst: Explicitly specify runlevels again. (LP: #229336)

[Dustin Kirkland]
* debian/control: Depend on lsb-base >= 3.2-14, providing status_of_proc().
* debian/init.d: Add the 'status' action (LP: #251320). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 
 
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.
 
10
---
 
11
 
 
12
diff --git a/options.c b/options.c
 
13
index a79c553..d534cec 100644
 
14
--- a/options.c
 
15
+++ b/options.c
 
16
@@ -1838,22 +1838,28 @@ void server_options(char **args, int *argc_p)
 
17
        if (do_compression)
 
18
                argstr[x++] = 'z';
 
19
 
 
20
-       /* We make use of the -e option to let the server know about any
 
21
-        * pre-release protocol version && some behavior flags. */
 
22
-       argstr[x++] = 'e';
 
23
+       set_allow_inc_recurse();
 
24
+
 
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. */
 
29
+               argstr[x++] = 'e';
 
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);
 
34
-       } else
 
35
+               if (protocol_version == PROTOCOL_VERSION) {
 
36
+                       x += snprintf(argstr+x, sizeof argstr - x,
 
37
+                                     "%d.%d",
 
38
+                                     PROTOCOL_VERSION, SUBPROTOCOL_VERSION);
 
39
+               } else
 
40
 #endif
 
41
-               argstr[x++] = '.';
 
42
-       set_allow_inc_recurse();
 
43
-       if (allow_inc_recurse)
 
44
-               argstr[x++] = 'i';
 
45
+                       argstr[x++] = '.';
 
46
+               if (allow_inc_recurse)
 
47
+                       argstr[x++] = 'i';
 
48
 #if defined HAVE_LUTIMES && defined HAVE_UTIMES
 
49
-       argstr[x++] = 'L';
 
50
+               argstr[x++] = 'L';
 
51
 #endif
 
52
+       }
 
53
+
 
54
        argstr[x] = '\0';
 
55
 
 
56
        if (x > (int)sizeof argstr) { /* Not possible... */