The ACL code in make_file() needed to happen after the --chmod
authorWayne Davison <wayned@samba.org>
Fri, 10 Mar 2006 21:53:41 +0000 (21:53 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 10 Mar 2006 21:53:41 +0000 (21:53 +0000)
code twiddled the permissions.

acls.diff

index 008cda4..d064859 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1375,18 +1375,19 @@ After applying this patch, run these commands for a successful build:
  extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
-@@ -966,6 +967,10 @@ static struct file_struct *send_file_nam
-                        f == -2 ? SERVER_FILTERS : ALL_FILTERS);
-       if (!file)
-               return NULL;
+@@ -970,6 +971,11 @@ static struct file_struct *send_file_nam
+       if (chmod_modes && !S_ISLNK(file->mode))
+               file->mode = tweak_mode(file->mode, chmod_modes);
 +#ifdef SUPPORT_ACLS
 +      if (preserve_acls && make_acl(file, fname) < 0)
 +              return NULL;
 +#endif
++
+       maybe_emit_filelist_progress(flist->count + flist_count_offset);
  
-       if (chmod_modes && !S_ISLNK(file->mode))
-               file->mode = tweak_mode(file->mode, chmod_modes);
-@@ -977,6 +982,16 @@ static struct file_struct *send_file_nam
+       flist_expand(flist);
+@@ -977,6 +983,16 @@ static struct file_struct *send_file_nam
        if (file->basename[0]) {
                flist->files[flist->count++] = file;
                send_file_entry(file, f);
@@ -1403,7 +1404,7 @@ After applying this patch, run these commands for a successful build:
        }
        return file;
  }
-@@ -1365,6 +1380,11 @@ struct file_list *recv_file_list(int f)
+@@ -1365,6 +1381,11 @@ struct file_list *recv_file_list(int f)
                        flags |= read_byte(f) << 8;
                file = receive_file_entry(flist, flags, f);
  
@@ -1415,7 +1416,7 @@ After applying this patch, run these commands for a successful build:
                if (S_ISREG(file->mode) || S_ISLNK(file->mode))
                        stats.total_size += file->length;
  
-@@ -1387,6 +1407,11 @@ struct file_list *recv_file_list(int f)
+@@ -1387,6 +1408,11 @@ struct file_list *recv_file_list(int f)
  
        clean_flist(flist, relative_paths, 1);