Fixed a failing hunk.
authorWayne Davison <wayned@samba.org>
Wed, 8 Feb 2006 17:28:31 +0000 (17:28 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 8 Feb 2006 17:28:31 +0000 (17:28 +0000)
acls.diff

index 2ade185..2ba5425 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -4825,7 +4825,7 @@ ACLs to a non-ACL-supporting disk should complain.
    rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
    rprintf(F," -o, --owner                 preserve owner (super-user only)\n");
    rprintf(F," -g, --group                 preserve group\n");
-@@ -411,6 +420,9 @@ static struct poptOption long_options[] 
+@@ -409,6 +418,9 @@ static struct poptOption long_options[] 
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
@@ -4835,7 +4835,7 @@ ACLs to a non-ACL-supporting disk should complain.
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1060,6 +1072,23 @@ int parse_arguments(int *argc, const cha
+@@ -1062,6 +1074,23 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -4859,7 +4859,7 @@ ACLs to a non-ACL-supporting disk should complain.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1499,6 +1528,10 @@ void server_options(char **args,int *arg
+@@ -1502,6 +1531,10 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';
@@ -4907,19 +4907,19 @@ ACLs to a non-ACL-supporting disk should complain.
  
  /* This is only called when we aren't preserving permissions.  Figure out what
   * the permissions should be and return them merged back into the mode. */
--mode_t dest_mode(mode_t flist_mode, mode_t dest_mode, int exists)
-+mode_t dest_mode(mode_t flist_mode, mode_t dest_mode, int dflt_perms,
+-mode_t dest_mode(mode_t flist_mode, mode_t cur_mode, int exists)
++mode_t dest_mode(mode_t flist_mode, mode_t cur_mode, int dflt_perms,
 +               int exists)
  {
        /* If the file already exists, we'll return the local permissions,
         * possibly tweaked by the --executability option. */
 @@ -115,7 +116,7 @@ mode_t dest_mode(mode_t flist_mode, mode
-                               dest_mode |= (dest_mode & 0444) >> 2;
+                               cur_mode |= (cur_mode & 0444) >> 2;
                }
        } else
--              dest_mode = flist_mode & ACCESSPERMS & ~orig_umask;
-+              dest_mode = (flist_mode & ACCESSPERMS & dflt_perms) | S_IWUSR;
-       return (flist_mode & ~CHMOD_BITS) | (dest_mode & CHMOD_BITS);
+-              cur_mode = flist_mode & ACCESSPERMS & ~orig_umask;
++              cur_mode = (flist_mode & ACCESSPERMS & dflt_perms) | S_IWUSR;
+       return (flist_mode & ~CHMOD_BITS) | (cur_mode & CHMOD_BITS);
  }
  
 @@ -214,6 +215,14 @@ int set_file_attrs(char *fname, struct f
@@ -4994,7 +4994,7 @@ ACLs to a non-ACL-supporting disk should complain.
       --chmod=CHMOD           change destination permissions
   -o, --owner                 preserve owner (super-user only)
   -g, --group                 preserve group
-@@ -692,7 +693,9 @@ quote(itemize(
+@@ -691,7 +692,9 @@ quote(itemize(
    permissions, though the bf(--executability) option might change just
    the execute permission for the file.
    it() New files get their "normal" permission bits set to the source
@@ -5005,7 +5005,7 @@ ACLs to a non-ACL-supporting disk should complain.
    their special permission bits disabled except in the case where a new
    directory inherits a setgid bit from its parent directory.
  ))
-@@ -723,9 +726,11 @@ The preservation of the destination's se
+@@ -722,9 +725,11 @@ The preservation of the destination's se
  directories when bf(--perms) is off was added in rsync 2.6.7.  Older rsync
  versions erroneously preserved the three special permission bits for
  newly-created files when bf(--perms) was off, while overriding the
@@ -5020,7 +5020,7 @@ ACLs to a non-ACL-supporting disk should complain.
  
  dit(bf(-E, --executability)) This option causes rsync to preserve the
  executability (or non-executability) of regular files when bf(--perms) is
-@@ -743,6 +748,10 @@ quote(itemize(
+@@ -742,6 +747,10 @@ quote(itemize(
  
  If bf(--perms) is enabled, this option is ignored.