Fix merge conflicts.
authorWayne Davison <wayne@opencoder.net>
Mon, 6 Jul 2020 05:56:42 +0000 (22:56 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 6 Jul 2020 05:56:42 +0000 (22:56 -0700)
crtimes.diff
fileflags.diff
nameconverter.diff

index 292914912ae807d341809d5c47b7b12ad32814e8..0614b2a8cb6988eb54b5cadb9bb3ca64c4e22ef2 100644 (file)
@@ -20,8 +20,8 @@ diff --git a/compat.c b/compat.c
  extern int preserve_acls;
  extern int preserve_xattrs;
  extern int preserve_fileflags;
-@@ -77,7 +78,7 @@ int inplace_partial = 0;
- int do_negotiated_strings = 0;
+@@ -78,7 +79,7 @@ int do_negotiated_strings = 0;
+ int xmit_id0_names = 0;
  
  /* These index values are for the file-list's extra-attribute array. */
 -int pathname_ndx, depth_ndx, atimes_ndx, uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
@@ -29,7 +29,7 @@ diff --git a/compat.c b/compat.c
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
  int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -555,6 +556,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -557,6 +558,8 @@ void setup_protocol(int f_out,int f_in)
         * aligned for direct int64-pointer memory access. */
        if (preserve_atimes)
                atimes_ndx = (file_extra_cnt += EXTRA64_CNT);
@@ -38,10 +38,10 @@ diff --git a/compat.c b/compat.c
        if (am_sender) /* This is most likely in the in64 union as well. */
                pathname_ndx = (file_extra_cnt += PTR_EXTRA_CNT);
        else
-@@ -718,6 +721,10 @@ void setup_protocol(int f_out,int f_in)
-               want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
+@@ -723,6 +726,10 @@ void setup_protocol(int f_out,int f_in)
                proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
                xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0;
+               xmit_id0_names = compat_flags & CF_ID0_NAMES ? 1 : 0;
 +              if (!xfer_flags_as_varint && preserve_crtimes) {
 +                      fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n");
 +                      exit_cleanup(RERR_PROTOCOL);
@@ -449,7 +449,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
  #define ITEM_XNAME_FOLLOWS (1<<12)
  #define ITEM_IS_NEW (1<<13)
-@@ -577,6 +579,10 @@ typedef unsigned int size_t;
+@@ -579,6 +581,10 @@ typedef unsigned int size_t;
  #define ST_FLAGS(st) NO_FFLAGS
  #endif
  
@@ -460,7 +460,7 @@ diff --git a/rsync.h b/rsync.h
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -786,6 +792,7 @@ struct file_struct {
+@@ -796,6 +802,7 @@ struct file_struct {
  extern int file_extra_cnt;
  extern int inc_recurse;
  extern int atimes_ndx;
@@ -468,7 +468,7 @@ diff --git a/rsync.h b/rsync.h
  extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
-@@ -850,6 +857,7 @@ extern int xattrs_ndx;
+@@ -864,6 +871,7 @@ extern int xattrs_ndx;
  #define F_XATTR(f) REQ_EXTRA(f, xattrs_ndx)->num
  #define F_NDX(f) REQ_EXTRA(f, unsort_ndx)->num
  #define F_ATIME(f) REQ_EXTRA64(f, atimes_ndx)->num
@@ -476,7 +476,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These items are per-entry optional: */
  #define F_HL_GNUM(f) OPT_EXTRA(f, START_BUMP(f))->num /* non-dirs */
-@@ -1092,6 +1100,7 @@ typedef struct {
+@@ -1116,6 +1124,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
index 1d6728d3fb3529e876c0a651436c8320297ceb8a..f591d88d43bf100b9b87b18273d6824e3120f3a2 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
+based-on: bb16db1747e1119e3cbdbcee6d47ecd68def66cc
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
@@ -26,8 +26,8 @@ diff --git a/compat.c b/compat.c
  extern int xfer_flags_as_varint;
  extern int need_messages_from_generator;
  extern int delete_mode, delete_before, delete_during, delete_after;
-@@ -75,7 +77,7 @@ int inplace_partial = 0;
- int do_negotiated_strings = 0;
+@@ -76,7 +78,7 @@ int do_negotiated_strings = 0;
+ int xmit_id0_names = 0;
  
  /* These index values are for the file-list's extra-attribute array. */
 -int pathname_ndx, depth_ndx, atimes_ndx, uid_ndx, gid_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
@@ -35,7 +35,7 @@ diff --git a/compat.c b/compat.c
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
  int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -561,6 +563,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -563,6 +565,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -44,10 +44,10 @@ diff --git a/compat.c b/compat.c
        if (preserve_acls && !am_sender)
                acls_ndx = ++file_extra_cnt;
        if (preserve_xattrs)
-@@ -714,6 +718,10 @@ void setup_protocol(int f_out,int f_in)
-               want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
+@@ -719,6 +723,10 @@ void setup_protocol(int f_out,int f_in)
                proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
                xfer_flags_as_varint = compat_flags & CF_VARINT_FLIST_FLAGS ? 1 : 0;
+               xmit_id0_names = compat_flags & CF_ID0_NAMES ? 1 : 0;
 +              if (!xfer_flags_as_varint && preserve_fileflags) {
 +                      fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --fileflags.\n");
 +                      exit_cleanup(RERR_PROTOCOL);
@@ -429,7 +429,7 @@ diff --git a/options.c b/options.c
  
        /* Now we use the descrip values to actually mark the options for refusal. */
        for (op = long_options; op != list_end; op++) {
-@@ -2646,6 +2669,9 @@ void server_options(char **args, int *argc_p)
+@@ -2647,6 +2670,9 @@ void server_options(char **args, int *argc_p)
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -439,7 +439,7 @@ diff --git a/options.c b/options.c
        if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
                if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
                        goto oom;
-@@ -2749,6 +2775,16 @@ void server_options(char **args, int *argc_p)
+@@ -2750,6 +2776,16 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--delete-excluded";
                if (force_delete)
                        args[ac++] = "--force";
@@ -704,7 +704,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
  #define ITEM_XNAME_FOLLOWS (1<<12)
  #define ITEM_IS_NEW (1<<13)
-@@ -550,6 +552,31 @@ typedef unsigned int size_t;
+@@ -552,6 +554,31 @@ typedef unsigned int size_t;
  #endif
  #endif
  
@@ -736,7 +736,7 @@ diff --git a/rsync.h b/rsync.h
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -763,6 +790,7 @@ extern int pathname_ndx;
+@@ -773,6 +800,7 @@ extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -744,7 +744,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -813,6 +841,11 @@ extern int xattrs_ndx;
+@@ -827,6 +855,11 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
index c2c8bd1ca42a32ae71776842adfad21c0512c022..4e7e1bbf16ef4b8b136df1ff91c9807caefb81ce 100644 (file)
@@ -20,46 +20,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: 194cee671d5e178f20c4494f41911fa8db942935
-diff --git a/authenticate.c b/authenticate.c
---- a/authenticate.c
-+++ b/authenticate.c
-@@ -227,7 +227,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
-       char *users = lp_auth_users(module);
-       char challenge[MAX_DIGEST_LEN*2];
-       char line[BIGPATHBUFLEN];
--      char **auth_uid_groups = NULL;
-+      const char **auth_uid_groups = NULL;
-       int auth_uid_groups_cnt = -1;
-       const char *err = NULL;
-       int group_match = -1;
-@@ -287,7 +287,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
-                               else {
-                                       gid_t *gid_array = gid_list.items;
-                                       auth_uid_groups_cnt = gid_list.count;
--                                      auth_uid_groups = new_array(char *, auth_uid_groups_cnt);
-+                                      auth_uid_groups = new_array(const char *, auth_uid_groups_cnt);
-                                       for (j = 0; j < auth_uid_groups_cnt; j++)
-                                               auth_uid_groups[j] = gid_to_group(gid_array[j]);
-                               }
-@@ -313,7 +313,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
-       else if (opt_ch == 'd')
-               err = "denied by rule";
-       else {
--              char *group = group_match >= 0 ? auth_uid_groups[group_match] : NULL;
-+              const char *group = group_match >= 0 ? auth_uid_groups[group_match] : NULL;
-               err = check_secret(module, line, group, challenge, pass);
-       }
-@@ -324,7 +324,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
-               int j;
-               for (j = 0; j < auth_uid_groups_cnt; j++) {
-                       if (auth_uid_groups[j])
--                              free(auth_uid_groups[j]);
-+                              free((char*)auth_uid_groups[j]);
-               }
-               free(auth_uid_groups);
-       }
+based-on: bb16db1747e1119e3cbdbcee6d47ecd68def66cc
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
@@ -305,20 +266,17 @@ diff --git a/t_stub.c b/t_stub.c
 diff --git a/uidlist.c b/uidlist.c
 --- a/uidlist.c
 +++ b/uidlist.c
-@@ -33,6 +33,7 @@ extern int preserve_uid;
- extern int preserve_gid;
+@@ -34,6 +34,7 @@ extern int preserve_gid;
  extern int preserve_acls;
  extern int numeric_ids;
+ extern int xmit_id0_names;
 +extern pid_t namecvt_pid;
  extern gid_t our_gid;
  extern char *usermap;
  extern char *groupmap;
-@@ -95,19 +96,27 @@ static struct idlist *add_to_list(struct idlist **root, id_t id, union name_or_i
- }
+@@ -98,8 +99,12 @@ static struct idlist *add_to_list(struct idlist **root, id_t id, union name_or_i
  /* turn a uid into a user name */
--char *uid_to_user(uid_t uid)
-+const char *uid_to_user(uid_t uid)
+ const char *uid_to_user(uid_t uid)
  {
 -      struct passwd *pass = getpwuid(uid);
 -      if (pass)
@@ -331,10 +289,9 @@ diff --git a/uidlist.c b/uidlist.c
                return strdup(pass->pw_name);
        return NULL;
  }
+@@ -107,8 +112,12 @@ const char *uid_to_user(uid_t uid)
  /* turn a gid into a group name */
--char *gid_to_group(gid_t gid)
-+const char *gid_to_group(gid_t gid)
+ const char *gid_to_group(gid_t gid)
  {
 -      struct group *grp = getgrgid(gid);
 -      if (grp)
@@ -347,7 +304,7 @@ diff --git a/uidlist.c b/uidlist.c
                return strdup(grp->gr_name);
        return NULL;
  }
-@@ -115,32 +124,54 @@ char *gid_to_group(gid_t gid)
+@@ -116,32 +125,54 @@ const char *gid_to_group(gid_t gid)
  /* Parse a user name or (optionally) a number into a uid */
  int user_to_uid(const char *name, uid_t *uid_p, BOOL num_ok)
  {