Fixed some build problems that crept into the code.
authorWayne Davison <wayned@samba.org>
Tue, 20 Feb 2007 23:04:11 +0000 (23:04 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 20 Feb 2007 23:04:11 +0000 (23:04 +0000)
acls.diff
omit-dir-changes.diff

index 215749f..7a05fd6 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1747,7 +1747,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                return;
                        statret = -1;
                }
-@@ -1159,7 +1209,7 @@ static void recv_generator(char *fname, 
+@@ -1159,18 +1209,18 @@ static void recv_generator(char *fname, 
                        dry_run++;
                }
                real_ret = statret;
@@ -1756,8 +1756,13 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                if (new_root_dir) {
                        if (*fname == '.' && fname[1] == '\0')
                                statret = -1;
-@@ -1170,7 +1220,7 @@ static void recv_generator(char *fname, 
-                                              statret == 0);
+                       new_root_dir = 0;
+               }
+               if (!preserve_perms) { /* See comment in non-dir code below. */
+-                      file->mode = dest_mode(file->mode, st.st_mode,
+-                                             statret == 0);
++                      file->mode = dest_mode(file->mode, sx.st.st_mode,
++                                             dflt_perms, statret == 0);
                }
                if (statret != 0 && basis_dir[0] != NULL) {
 -                      int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &st,
index 61d8f50..14f3370 100644 (file)
@@ -32,15 +32,15 @@ To use this patch, run these commands for a successful build:
                        iflags |= ITEM_REPORT_GROUP;
        } else
                iflags |= ITEM_IS_NEW;
-@@ -1216,7 +1218,7 @@ static void recv_generator(char *fname, 
-       /* If we're not preserving permissions, change the file-list's
-        * mode based on the local permissions and some heuristics. */
--      if (!preserve_perms) {
-+      if (!preserve_perms || (omit_dir_changes && S_ISDIR(st.st_mode))) {
-               int exists = statret == 0 && !S_ISDIR(st.st_mode);
-               file->mode = dest_mode(file->mode, st.st_mode, exists);
-       }
+@@ -1165,7 +1167,7 @@ static void recv_generator(char *fname, 
+                               statret = -1;
+                       new_root_dir = 0;
+               }
+-              if (!preserve_perms) { /* See comment in non-dir code below. */
++              if (!preserve_perms || omit_dir_changes) { /* See comment in non-dir code below. */
+                       file->mode = dest_mode(file->mode, st.st_mode,
+                                              statret == 0);
+               }
 --- old/options.c
 +++ new/options.c
 @@ -54,6 +54,7 @@ int preserve_uid = 0;
@@ -86,25 +86,6 @@ To use this patch, run these commands for a successful build:
        } else {
                if (copy_links)
                        argstr[x++] = 'L';
---- old/receiver.c
-+++ new/receiver.c
-@@ -37,6 +37,7 @@ extern int protocol_version;
- extern int relative_paths;
- extern int preserve_hard_links;
- extern int preserve_perms;
-+extern int omit_dir_changes;
- extern int basis_dir_cnt;
- extern int make_backups;
- extern int cleanup_got_literal;
-@@ -560,7 +561,7 @@ int recv_files(int f_in, char *local_nam
-               /* If we're not preserving permissions, change the file-list's
-                * mode based on the local permissions and some heuristics. */
--              if (!preserve_perms) {
-+              if (!preserve_perms || (omit_dir_changes && S_ISDIR(st.st_mode))) {
-                       int exists = fd1 != -1;
-                       file->mode = dest_mode(file->mode, st.st_mode, exists);
-               }
 --- old/rsync.c
 +++ new/rsync.c
 @@ -35,6 +35,7 @@ extern int preserve_perms;