Fixed failing hunks.
[rsync/rsync-patches.git] / xattrs.diff
index 1841956..4b05252 100644 (file)
@@ -54,7 +54,7 @@ After applying this patch, run these commands for a successful build:
        if (verbose > 1) {
 --- orig/configure.in  2004-08-19 19:53:27
 +++ configure.in       2005-05-12 22:57:53
-@@ -821,6 +821,30 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_
+@@ -822,6 +822,30 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_
    AC_MSG_RESULT(no)
  )
  
@@ -85,11 +85,11 @@ After applying this patch, run these commands for a successful build:
  AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
  AC_OUTPUT
  
---- orig/flist.c       2005-03-16 02:24:11
+--- orig/flist.c       2005-07-29 02:49:06
 +++ flist.c    2005-05-12 22:55:41
 @@ -976,6 +976,8 @@ static struct file_struct *send_file_nam
                return NULL;
-       if (!MAKE_ACL(file, fname))
+       if (MAKE_ACL(file, fname) < 0)
                return NULL;
 +      if (!MAKE_XATTR(file, fname))
 +              return NULL;
@@ -108,7 +108,7 @@ After applying this patch, run these commands for a successful build:
        }
        return file;
  }
-@@ -1325,6 +1329,7 @@ struct file_list *recv_file_list(int f)
+@@ -1334,6 +1338,7 @@ struct file_list *recv_file_list(int f)
                file = receive_file_entry(flist, flags, f);
  
                RECEIVE_ACL(file, f);
@@ -116,7 +116,7 @@ After applying this patch, run these commands for a successful build:
  
                if (S_ISREG(file->mode))
                        stats.total_size += file->length;
-@@ -1349,6 +1354,7 @@ struct file_list *recv_file_list(int f)
+@@ -1358,6 +1363,7 @@ struct file_list *recv_file_list(int f)
        clean_flist(flist, relative_paths, 1);
  
        SORT_FILE_ACL_INDEX_LISTS();
@@ -126,7 +126,7 @@ After applying this patch, run these commands for a successful build:
                /* Now send the uid/gid list. This was introduced in
 --- orig/generator.c   2005-05-12 23:34:00
 +++ generator.c        2005-05-12 23:21:08
-@@ -720,6 +720,10 @@ static void recv_generator(char *fname, 
+@@ -729,6 +729,10 @@ static void recv_generator(char *fname, 
                if (f_out == -1)
                        SET_ACL(fname, file);
  #endif
@@ -193,8 +193,8 @@ After applying this patch, run these commands for a successful build:
 +#else
 +
 +#endif /* No xattrs */
---- orig/options.c     2005-05-12 23:34:38
-+++ options.c  2005-05-12 23:21:25
+--- orig/options.c     2005-08-27 21:15:29
++++ options.c  2005-08-27 21:29:40
 @@ -44,6 +44,7 @@ int copy_links = 0;
  int preserve_links = 0;
  int preserve_hard_links = 0;
@@ -203,7 +203,7 @@ After applying this patch, run these commands for a successful build:
  int preserve_perms = 0;
  int preserve_devices = 0;
  int preserve_uid = 0;
-@@ -182,6 +183,7 @@ static void print_rsync_version(enum log
+@@ -183,6 +184,7 @@ static void print_rsync_version(enum log
        char const *have_inplace = "no ";
        char const *hardlinks = "no ";
        char const *acls = "no ";
@@ -211,7 +211,7 @@ After applying this patch, run these commands for a successful build:
        char const *links = "no ";
        char const *ipv6 = "no ";
        STRUCT_STAT *dumstat;
-@@ -201,7 +203,9 @@ static void print_rsync_version(enum log
+@@ -202,7 +204,9 @@ static void print_rsync_version(enum log
  #ifdef SUPPORT_ACLS
        acls = "";
  #endif
@@ -222,7 +222,7 @@ After applying this patch, run these commands for a successful build:
  #ifdef SUPPORT_LINKS
        links = "";
  #endif
-@@ -216,9 +220,9 @@ static void print_rsync_version(enum log
+@@ -217,9 +221,9 @@ static void print_rsync_version(enum log
                "Copyright (C) 1996-2005 by Andrew Tridgell and others\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
        rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@ -234,7 +234,7 @@ After applying this patch, run these commands for a successful build:
  
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
-@@ -289,6 +293,7 @@ void usage(enum logcode F)
+@@ -291,6 +295,7 @@ void usage(enum logcode F)
    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");
@@ -242,33 +242,35 @@ After applying this patch, run these commands for a successful build:
    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");
-@@ -416,6 +421,7 @@ static struct poptOption long_options[] 
-   {"copy-unsafe-links",0,  POPT_ARG_NONE,   &copy_unsafe_links, 0, 0, 0 },
-   {"perms",           'p', POPT_ARG_NONE,   &preserve_perms, 0, 0, 0 },
-   {"acls",            'A', POPT_ARG_NONE,   0,              'A', 0, 0 },
-+  {"xattrs",          'X', POPT_ARG_NONE,   0,              'X', 0, 0 },
-   {"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 },
-@@ -901,6 +907,17 @@ int parse_arguments(int *argc, const cha
+@@ -395,6 +400,9 @@ static struct poptOption long_options[] 
+   {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },
+   {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
+   {"no-A",             0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
++  {"xattrs",          'X', POPT_ARG_NONE,   0, 'X', 0, 0 },
++  {"no-xattrs",        0,  POPT_ARG_VAL,    &preserve_xattrs, 0, 0, 0 },
++  {"no-X",             0,  POPT_ARG_VAL,    &preserve_xattrs, 0, 0, 0 },
+   {"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 },
+@@ -943,6 +951,17 @@ int parse_arguments(int *argc, const cha
+                       return 0;
  #endif /* SUPPORT_ACLS */
-                       break;
  
 +              case 'X':
 +#ifdef SUPPORT_XATTRS
 +                      preserve_xattrs = 1;
 +                      preserve_perms = 1;
++                      break;
 +#else
 +                      snprintf(err_buf,sizeof(err_buf),
 +                               "extended attributes are not supported on this %s\n",
 +                               am_server ? "server" : "client");
 +                      return 0;
 +#endif /* SUPPORT_XATTRS */
-+                      break;
  
                default:
                        /* A large opt value means that set_refuse_options()
-@@ -1310,6 +1327,8 @@ void server_options(char **args,int *arg
+@@ -1359,6 +1378,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'H';
        if (preserve_acls)
                argstr[x++] = 'A';
@@ -279,7 +281,7 @@ After applying this patch, run these commands for a successful build:
        if (preserve_gid)
 --- orig/rsync.c       2004-07-03 20:11:58
 +++ rsync.c    2005-03-03 01:31:22
-@@ -144,6 +144,14 @@ int set_perms(char *fname,struct file_st
+@@ -146,6 +146,14 @@ int set_perms(char *fname,struct file_st
                if (SET_ACL(fname, file) == 0)
                        updated = 1;
        }
@@ -294,9 +296,9 @@ After applying this patch, run these commands for a successful build:
  
        if (verbose > 1 && flags & PERMS_REPORT) {
                enum logcode code = daemon_log_format_has_i || dry_run
---- orig/rsync.h       2005-05-12 23:32:56
+--- orig/rsync.h       2005-07-29 02:25:55
 +++ rsync.h    2005-05-12 23:19:46
-@@ -676,6 +676,38 @@ struct stats {
+@@ -684,6 +684,38 @@ struct stats {
  #endif /* SUPPORT_ACLS */
  #include "smb_acls.h"
  
@@ -337,7 +339,7 @@ After applying this patch, run these commands for a successful build:
  /* We have replacement versions of these if they're missing. */
 --- orig/rsync.yo      2004-07-03 20:11:58
 +++ rsync.yo   2005-03-03 01:33:53
-@@ -307,6 +307,7 @@ to the detailed description below for a 
+@@ -319,6 +319,7 @@ to the detailed description below for a 
   -K, --keep-dirlinks         treat symlinked dir on receiver as dir
   -p, --perms                 preserve permissions
   -A, --acls                  preserve ACLs (implies -p) [local option]
@@ -345,7 +347,7 @@ After applying this patch, run these commands for a successful build:
   -o, --owner                 preserve owner (root only)
   -g, --group                 preserve group
   -D, --devices               preserve devices (root only)
-@@ -624,6 +625,11 @@ ACLs to be the same as the local ACLs.  
+@@ -671,6 +672,11 @@ ACLs to be the same as the local ACLs.  
  remote machine's rsync supports this option also. This is a non-standard
  option.