Fixed failing hunk.
authorWayne Davison <wayned@samba.org>
Tue, 10 Aug 2004 17:21:53 +0000 (17:21 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 10 Aug 2004 17:21:53 +0000 (17:21 +0000)
compare-dest.diff

index bb2bfaf..9732e5e 100644 (file)
@@ -20,7 +20,7 @@ Before compiling, be sure to run "make proto".
  extern int link_dest;
  extern int whole_file;
  extern int local_server;
-@@ -413,11 +413,19 @@ static void recv_generator(char *fname, 
+@@ -419,11 +419,19 @@ static void recv_generator(char *fname, 
        fnamecmp = fname;
        fnamecmp_type = G2R_FNAME;
  
@@ -44,7 +44,7 @@ Before compiling, be sure to run "make proto".
  #if HAVE_LINK
                        if (link_dest && !dry_run) {
                                if (do_link(fnamecmpbuf, fname) < 0) {
-@@ -428,15 +436,14 @@ static void recv_generator(char *fname, 
+@@ -434,15 +442,14 @@ static void recv_generator(char *fname, 
                                                        safe_fname(fname));
                                        }
                                        fnamecmp = fnamecmpbuf;
@@ -73,7 +73,7 @@ Before compiling, be sure to run "make proto".
  extern char *rsync_path;
  extern char *shell_cmd;
  extern char *batch_name;
-@@ -459,7 +459,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -463,7 +463,7 @@ static int do_recv(int f_in,int f_out,st
        int pid;
        int status = 0;
        int error_pipe[2], name_pipe[2];
@@ -82,9 +82,9 @@ Before compiling, be sure to run "make proto".
  
        /* The receiving side mustn't obey this, or an existing symlink that
         * points to an identical file won't be replaced by the referent. */
---- orig/options.c     2004-08-03 15:41:32
-+++ options.c  2004-07-30 07:23:54
-@@ -115,12 +115,13 @@ int write_batch = 0;
+--- orig/options.c     2004-08-05 21:57:29
++++ options.c  2004-08-10 05:26:53
+@@ -114,12 +114,13 @@ int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
  int backup_suffix_len;
@@ -99,7 +99,7 @@ Before compiling, be sure to run "make proto".
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *log_format = NULL;
-@@ -141,6 +142,7 @@ char *batch_name = NULL;
+@@ -140,6 +141,7 @@ char *batch_name = NULL;
  
  static int daemon_opt;   /* sets am_daemon after option error-reporting */
  static int modify_window_set;
@@ -107,7 +107,7 @@ Before compiling, be sure to run "make proto".
  
  /** Local address to bind.  As a character string because it's
   * interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -318,7 +320,7 @@ void usage(enum logcode F)
+@@ -317,7 +319,7 @@ void usage(enum logcode F)
  }
  
  enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
@@ -116,7 +116,7 @@ Before compiling, be sure to run "make proto".
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
        OPT_REFUSED_BASE = 9000};
-@@ -377,8 +379,8 @@ static struct poptOption long_options[] 
+@@ -376,8 +378,8 @@ static struct poptOption long_options[] 
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, OPT_TIMEOUT, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
@@ -127,7 +127,7 @@ Before compiling, be sure to run "make proto".
    /* TODO: Should this take an optional int giving the compression level? */
    {"compress",        'z', POPT_ARG_NONE,   &do_compression, 0, 0, 0 },
    {"daemon",           0,  POPT_ARG_NONE,   &daemon_opt, 0, 0, 0 },
-@@ -607,8 +609,28 @@ int parse_arguments(int *argc, const cha
+@@ -609,8 +611,28 @@ int parse_arguments(int *argc, const cha
                                select_timeout = io_timeout;
                        break;
  
@@ -138,7 +138,7 @@ Before compiling, be sure to run "make proto".
 +                      }
 +                      arg = poptGetOptArg(pc);
 +                      if (sanitize_paths)
-+                              arg = alloc_sanitize_path(arg, curr_dir);
++                              arg = sanitize_path(NULL, arg, "");
 +                      compare_dest[num_comp_dest++] = (char *)arg;
 +                      saw_compare_dest = 1;
 +                      break;
@@ -151,12 +151,12 @@ Before compiling, be sure to run "make proto".
 +                      }
 +                      arg = poptGetOptArg(pc);
 +                      if (sanitize_paths)
-+                              arg = alloc_sanitize_path(arg, curr_dir);
++                              arg = sanitize_path(NULL, arg, "");
 +                      compare_dest[num_comp_dest++] = (char *)arg;
                        link_dest = 1;
                        break;
  #else
-@@ -701,6 +723,11 @@ int parse_arguments(int *argc, const cha
+@@ -703,6 +725,11 @@ int parse_arguments(int *argc, const cha
                return 0;
        }
  
@@ -168,16 +168,16 @@ Before compiling, be sure to run "make proto".
        if (archive_mode) {
                if (!files_from)
                        recurse = 1;
-@@ -731,8 +758,6 @@ int parse_arguments(int *argc, const cha
-                       tmpdir = alloc_sanitize_path(tmpdir, curr_dir);
+@@ -733,8 +760,6 @@ int parse_arguments(int *argc, const cha
+                       tmpdir = sanitize_path(NULL, tmpdir, "");
                if (partial_dir)
-                       partial_dir = alloc_sanitize_path(partial_dir, curr_dir);
+                       partial_dir = sanitize_path(NULL, partial_dir, "");
 -              if (compare_dest)
--                      compare_dest = alloc_sanitize_path(compare_dest, curr_dir);
+-                      compare_dest = sanitize_path(NULL, compare_dest, "");
                if (backup_dir)
-                       backup_dir = alloc_sanitize_path(backup_dir, curr_dir);
+                       backup_dir = sanitize_path(NULL, backup_dir, "");
                if (files_from)
-@@ -882,8 +907,8 @@ int parse_arguments(int *argc, const cha
+@@ -884,8 +909,8 @@ int parse_arguments(int *argc, const cha
   **/
  void server_options(char **args,int *argc)
  {
@@ -187,7 +187,7 @@ Before compiling, be sure to run "make proto".
        char *arg;
  
        int i, x;
-@@ -1067,13 +1092,16 @@ void server_options(char **args,int *arg
+@@ -1069,13 +1094,16 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }