Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Thu, 23 Feb 2006 20:02:11 +0000 (20:02 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 23 Feb 2006 20:02:11 +0000 (20:02 +0000)
acls.diff

index cbb36da..d3a3be0 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1404,65 +1404,18 @@ ACLs to a non-ACL-supporting disk should complain.
  
  /* Acts on the_file_list->file's ndx'th item, whose name is fname.  If a dir,
   * make sure it exists, and has the right permissions/timestamp info.  For
-@@ -773,6 +774,7 @@ static void recv_generator(char *fname, 
-       static int missing_below = -1, excluded_below = -1;
-       static char *parent_dirname = "";
-       static struct file_list *fuzzy_dirlist = NULL;
-+      static struct file_list *need_dirlist = (struct file_list *)"";
-       struct file_struct *fuzzy_file = NULL;
-       int fd = -1, f_copy = -1;
-       STRUCT_STAT st, real_st, partial_st;
-@@ -790,12 +792,12 @@ static void recv_generator(char *fname, 
-               if (fuzzy_dirlist) {
-                       flist_free(fuzzy_dirlist);
-                       fuzzy_dirlist = NULL;
--                      parent_dirname = "";
-               }
-               if (missing_below >= 0) {
-                       dry_run--;
-                       missing_below = -1;
-               }
-+              parent_dirname = "";
-               return;
-       }
-@@ -830,18 +832,31 @@ static void recv_generator(char *fname, 
-               statret = -1;
-               stat_errno = ENOENT;
-       } else {
--              if (fuzzy_basis && S_ISREG(file->mode)) {
-+              if (fuzzy_basis
-+#ifdef SUPPORT_ACLS
-+               || !preserve_perms
-+#endif
-+              ) {
-                       char *dn = file->dirname ? file->dirname : ".";
-                       if (parent_dirname != dn
-                           && strcmp(parent_dirname, dn) != 0) {
-                               if (fuzzy_dirlist)
-                                       flist_free(fuzzy_dirlist);
--                              if (implied_dirs || stat(dn, &st) == 0)
--                                      fuzzy_dirlist = get_dirlist(dn, -1, 1);
--                              else
-+                              if (implied_dirs || stat(dn, &st) == 0) {
-+                                      if (fuzzy_basis)
-+                                              fuzzy_dirlist = need_dirlist;
+@@ -847,6 +848,10 @@ static void recv_generator(char *fname, 
+                       }
+                       if (fuzzy_basis)
+                               fuzzy_dirlist = need_dirlist;
 +#ifdef SUPPORT_ACLS
-+                                      if (!preserve_perms)
-+                                              dflt_perms = default_perms_for_dir(dn);
++                      if (!preserve_perms)
++                              dflt_perms = default_perms_for_dir(dn);
 +#endif
-+                              } else {
-                                       fuzzy_dirlist = NULL;
-+                                      dflt_perms = ~orig_umask;
-+                              }
-                       }
-                       parent_dirname = dn;
-+                      if (fuzzy_dirlist == need_dirlist && S_ISREG(file->mode))
-+                              fuzzy_dirlist = get_dirlist(dn, -1, 1);
                }
+               parent_dirname = dn;
  
-               statret = link_stat(fname, &st,
-@@ -863,7 +878,8 @@ static void recv_generator(char *fname, 
+@@ -872,7 +877,8 @@ static void recv_generator(char *fname, 
        if (!preserve_perms) {
                int exists = statret == 0
                          && S_ISDIR(st.st_mode) == S_ISDIR(file->mode);
@@ -1472,7 +1425,7 @@ ACLs to a non-ACL-supporting disk should complain.
        }
  
        if (S_ISDIR(file->mode)) {
-@@ -897,6 +913,10 @@ static void recv_generator(char *fname, 
+@@ -906,6 +912,10 @@ static void recv_generator(char *fname, 
                if (set_file_attrs(fname, file, statret ? NULL : &st, 0)
                    && verbose && code && f_out != -1)
                        rprintf(code, "%s/\n", fname);
@@ -1483,7 +1436,7 @@ ACLs to a non-ACL-supporting disk should complain.
                if (delete_during && f_out != -1 && !phase && dry_run < 2
                    && (file->flags & FLAG_DEL_HERE))
                        delete_in_dir(the_file_list, fname, file, &st);
-@@ -1334,6 +1354,8 @@ void generate_files(int f_out, struct fi
+@@ -1343,6 +1353,8 @@ void generate_files(int f_out, struct fi
         * notice that and let us know via the redo pipe (or its closing). */
        ignore_timeout = 1;