Fixed failing hunks.
[rsync/rsync-patches.git] / acls.diff
index 022192a..ec09edb 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -11,7 +11,7 @@ from a disk that doesn't support ACLs.  This should be changed to silently
 notice that no ACLs are available to copy.  Of course, trying to write out
 ACLs to a non-ACL-supporting disk should complain.
 
---- orig/Makefile.in   2004-10-14 17:11:40
+--- orig/Makefile.in   2004-11-03 11:56:03
 +++ Makefile.in        2004-10-20 06:32:26
 @@ -25,16 +25,16 @@ VERSION=@VERSION@
  .SUFFIXES:
@@ -1166,7 +1166,7 @@ ACLs to a non-ACL-supporting disk should complain.
 +}
 +
 +#endif /* SUPPORT_ACLS */
---- orig/backup.c      2004-10-06 00:12:15
+--- orig/backup.c      2005-01-19 20:11:10
 +++ backup.c   2004-10-06 00:13:09
 @@ -119,6 +119,7 @@ static int make_bak_dir(char *fullpath)
                        } else {
@@ -1176,7 +1176,7 @@ ACLs to a non-ACL-supporting disk should complain.
                        }
                }
                *p = '/';
-@@ -176,6 +177,8 @@ static int keep_backup(char *fname)
+@@ -171,6 +172,8 @@ static int keep_backup(char *fname)
        if (!(buf = get_backup_name(fname)))
                return 0;
  
@@ -1185,7 +1185,7 @@ ACLs to a non-ACL-supporting disk should complain.
        /* Check to see if this is a device file, or link */
        if (IS_DEVICE(file->mode)) {
                if (am_root && preserve_devices) {
-@@ -249,6 +252,7 @@ static int keep_backup(char *fname)
+@@ -244,6 +247,7 @@ static int keep_backup(char *fname)
                }
        }
        set_perms(buf, file, NULL, 0);
@@ -1193,7 +1193,7 @@ ACLs to a non-ACL-supporting disk should complain.
        free(file);
  
        if (verbose > 1)
---- orig/configure.in  2004-10-06 00:12:16
+--- orig/configure.in  2005-01-10 00:21:12
 +++ configure.in       2004-08-19 19:53:27
 @@ -443,6 +443,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
      AC_CHECK_LIB(resolv, strcasecmp)
@@ -1207,7 +1207,7 @@ ACLs to a non-ACL-supporting disk should complain.
  dnl At the moment we don't test for a broken memcmp(), because all we
  dnl need to do is test for equality, not comparison, and it seems that
  dnl every platform has a memcmp that can do at least that.
-@@ -693,6 +698,77 @@ AC_SUBST(OBJ_RESTORE)
+@@ -718,6 +723,77 @@ AC_SUBST(OBJ_RESTORE)
  AC_SUBST(CC_SHOBJ_FLAG)
  AC_SUBST(BUILD_POPT)
  
@@ -1285,9 +1285,9 @@ ACLs to a non-ACL-supporting disk should complain.
  AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
  AC_OUTPUT
  
---- orig/flist.c       2004-09-21 09:40:27
+--- orig/flist.c       2005-01-24 01:43:09
 +++ flist.c    2004-07-03 20:11:58
-@@ -966,6 +966,8 @@ void send_file_name(int f, struct file_l
+@@ -994,6 +994,8 @@ void send_file_name(int f, struct file_l
  
        if (!file)
                return;
@@ -1296,7 +1296,7 @@ ACLs to a non-ACL-supporting disk should complain.
  
        maybe_emit_filelist_progress(flist);
  
-@@ -974,6 +976,10 @@ void send_file_name(int f, struct file_l
+@@ -1002,6 +1004,10 @@ void send_file_name(int f, struct file_l
        if (file->basename[0]) {
                flist->files[flist->count++] = file;
                send_file_entry(file, f, base_flags);
@@ -1307,7 +1307,7 @@ ACLs to a non-ACL-supporting disk should complain.
        }
  
        if (recursive && S_ISDIR(file->mode)
-@@ -1291,6 +1297,8 @@ struct file_list *recv_file_list(int f)
+@@ -1327,6 +1333,8 @@ struct file_list *recv_file_list(int f)
                        flags |= read_byte(f) << 8;
                receive_file_entry(&flist->files[i], flags, flist, f);
  
@@ -1316,7 +1316,7 @@ ACLs to a non-ACL-supporting disk should complain.
                if (S_ISREG(flist->files[i]->mode))
                        stats.total_size += flist->files[i]->length;
  
-@@ -1313,6 +1321,8 @@ struct file_list *recv_file_list(int f)
+@@ -1349,6 +1357,8 @@ struct file_list *recv_file_list(int f)
  
        clean_flist(flist, relative_paths, 1);
  
@@ -1325,9 +1325,9 @@ ACLs to a non-ACL-supporting disk should complain.
        if (f != -1) {
                /* Now send the uid/gid list. This was introduced in
                 * protocol version 15 */
---- orig/generator.c   2004-10-06 00:12:16
-+++ generator.c        2004-07-03 20:11:58
-@@ -338,6 +338,10 @@ static void recv_generator(char *fname, 
+--- orig/generator.c   2005-01-24 01:43:09
++++ generator.c        2005-01-24 01:45:43
+@@ -313,6 +313,10 @@ static void recv_generator(char *fname, 
                if (set_perms(fname, file, statret ? NULL : &st, 0)
                    && verbose && f_out != -1)
                        rprintf(FINFO, "%s/\n", safe_fname(fname));
@@ -1335,9 +1335,9 @@ ACLs to a non-ACL-supporting disk should complain.
 +              if (f_out == -1)
 +                      SET_ACL(fname, file);
 +#endif
-               return;
-       }
+               if (delete_during && f_out != -1
+                   && (file->flags & FLAG_DEL_START))
+                       delete_in_dir(flist, fname);
 --- orig/lib/sysacls.c 2004-10-20 15:35:58
 +++ lib/sysacls.c      2004-10-20 15:35:58
 @@ -0,0 +1,3217 @@
@@ -4597,7 +4597,7 @@ ACLs to a non-ACL-supporting disk should complain.
    next;
  }
  
---- orig/options.c     2004-10-14 17:11:40
+--- orig/options.c     2005-01-24 01:43:10
 +++ options.c  2004-08-19 17:38:57
 @@ -43,6 +43,7 @@ int keep_dirlinks = 0;
  int copy_links = 0;
@@ -4607,7 +4607,7 @@ ACLs to a non-ACL-supporting disk should complain.
  int preserve_perms = 0;
  int preserve_devices = 0;
  int preserve_uid = 0;
-@@ -152,6 +153,7 @@ static void print_rsync_version(enum log
+@@ -163,6 +164,7 @@ static void print_rsync_version(enum log
        char const *got_socketpair = "no ";
        char const *have_inplace = "no ";
        char const *hardlinks = "no ";
@@ -4615,7 +4615,7 @@ ACLs to a non-ACL-supporting disk should complain.
        char const *links = "no ";
        char const *ipv6 = "no ";
        STRUCT_STAT *dumstat;
-@@ -168,6 +170,10 @@ static void print_rsync_version(enum log
+@@ -179,6 +181,10 @@ static void print_rsync_version(enum log
        hardlinks = "";
  #endif
  
@@ -4626,7 +4626,7 @@ ACLs to a non-ACL-supporting disk should complain.
  #if SUPPORT_LINKS
        links = "";
  #endif
-@@ -182,9 +188,9 @@ static void print_rsync_version(enum log
+@@ -193,9 +199,9 @@ static void print_rsync_version(enum log
                "Copyright (C) 1996-2004 by Andrew Tridgell and others\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
        rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@ -4638,15 +4638,15 @@ ACLs to a non-ACL-supporting disk should complain.
  
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
-@@ -249,6 +255,7 @@ void usage(enum logcode F)
-   rprintf(F,"     --safe-links            ignore \"unsafe\" symlinks\n");
+@@ -261,6 +267,7 @@ void usage(enum logcode F)
    rprintf(F," -H, --hard-links            preserve hard links\n");
+   rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
 +  rprintf(F," -A, --acls                  preserve ACLs (implies --perms)\n");
    rprintf(F," -o, --owner                 preserve owner (root only)\n");
    rprintf(F," -g, --group                 preserve group\n");
    rprintf(F," -D, --devices               preserve devices (root only)\n");
-@@ -351,6 +358,7 @@ static struct poptOption long_options[] 
+@@ -371,6 +378,7 @@ static struct poptOption long_options[] 
    {"no-whole-file",    0,  POPT_ARG_VAL,    &whole_file, 0, 0, 0 },
    {"copy-unsafe-links", 0, POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
    {"perms",           'p', POPT_ARG_NONE,   &preserve_perms, 0, 0, 0 },
@@ -4654,9 +4654,9 @@ ACLs to a non-ACL-supporting disk should complain.
    {"owner",           'o', POPT_ARG_NONE,   &preserve_uid, 0, 0, 0 },
    {"group",           'g', POPT_ARG_NONE,   &preserve_gid, 0, 0, 0 },
    {"devices",         'D', POPT_ARG_NONE,   &preserve_devices, 0, 0, 0 },
-@@ -683,6 +691,24 @@ int parse_arguments(int *argc, const cha
-                       return 0;
- #endif
+@@ -753,6 +761,24 @@ int parse_arguments(int *argc, const cha
+                       basis_dir[basis_dir_cnt++] = (char *)arg;
+                       break;
  
 +              case 'A':
 +#if SUPPORT_ACLS
@@ -4679,7 +4679,7 @@ ACLs to a non-ACL-supporting disk should complain.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off (opt-BASE is its index). */
-@@ -999,6 +1025,8 @@ void server_options(char **args,int *arg
+@@ -1080,6 +1106,8 @@ void server_options(char **args,int *arg
  
        if (preserve_hard_links)
                argstr[x++] = 'H';
@@ -4688,9 +4688,9 @@ ACLs to a non-ACL-supporting disk should complain.
        if (preserve_uid)
                argstr[x++] = 'o';
        if (preserve_gid)
---- orig/rsync.c       2004-09-07 21:45:30
+--- orig/rsync.c       2005-01-24 00:57:24
 +++ rsync.c    2004-07-03 20:11:58
-@@ -207,6 +207,14 @@ int set_perms(char *fname,struct file_st
+@@ -233,6 +233,14 @@ int set_perms(char *fname,struct file_st
        }
  #endif
  
@@ -4705,9 +4705,9 @@ ACLs to a non-ACL-supporting disk should complain.
        if (verbose > 1 && flags & PERMS_REPORT) {
                if (updated)
                        rprintf(FINFO,"%s\n",fname);
---- orig/rsync.h       2004-10-09 03:21:56
+--- orig/rsync.h       2005-01-21 00:35:26
 +++ rsync.h    2004-07-03 20:11:58
-@@ -545,6 +545,40 @@ static inline int flist_up(struct file_l
+@@ -549,6 +549,40 @@ static inline int flist_up(struct file_l
  #include "lib/permstring.h"
  #include "lib/addrinfo.h"
  
@@ -4748,17 +4748,17 @@ ACLs to a non-ACL-supporting disk should complain.
  #include "proto.h"
  
  /* We have replacement versions of these if they're missing. */
---- orig/rsync.yo      2004-10-06 00:12:16
+--- orig/rsync.yo      2005-01-24 01:43:10
 +++ rsync.yo   2004-07-03 20:11:58
-@@ -326,6 +326,7 @@ verb(
-      --safe-links            ignore "unsafe" symlinks
+@@ -327,6 +327,7 @@ verb(
   -H, --hard-links            preserve hard links
+  -K, --keep-dirlinks         treat symlinked dir on receiver as dir
   -p, --perms                 preserve permissions
 + -A, --acls                  preserve ACLs (implies -p) [local option]
   -o, --owner                 preserve owner (root only)
   -g, --group                 preserve group
   -D, --devices               preserve devices (root only)
-@@ -585,6 +586,11 @@ source file's permissions and the umask 
+@@ -615,6 +616,11 @@ source file's permissions and the umask 
  other files (including updated files) retain their existing permissions
  (which is the same behavior as other file-copy utilities, such as cp).