Updated the section that ensures that server-excluded files aren't
authorWayne Davison <wayned@samba.org>
Fri, 13 Aug 2004 19:02:24 +0000 (19:02 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 13 Aug 2004 19:02:24 +0000 (19:02 +0000)
referenced by any compare-dest/link-dest args.

compare-dest.diff

index 975edf5..5436d11 100644 (file)
@@ -82,8 +82,8 @@ 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-11 23:42:23
-+++ options.c  2004-08-12 00:02:57
+--- orig/options.c     2004-08-12 18:34:38
++++ options.c  2004-08-13 07:55:37
 @@ -114,12 +114,13 @@ int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
@@ -177,7 +177,28 @@ Before compiling, be sure to run "make proto".
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
                if (files_from)
-@@ -884,8 +909,8 @@ int parse_arguments(int *argc, const cha
+@@ -742,6 +767,7 @@ int parse_arguments(int *argc, const cha
+       }
+       if (server_exclude_list.head && !am_sender) {
+               struct exclude_list_struct *elp = &server_exclude_list;
++              int i;
+               if (tmpdir) {
+                       clean_fname(tmpdir, 1);
+                       if (check_exclude(elp, tmpdir, 1) < 0)
+@@ -752,9 +778,9 @@ int parse_arguments(int *argc, const cha
+                       if (check_exclude(elp, partial_dir, 1) < 0)
+                               goto options_rejected;
+               }
+-              if (compare_dest) {
+-                      clean_fname(compare_dest, 1);
+-                      if (check_exclude(elp, compare_dest, 1) < 0)
++              for (i = 0; i < num_comp_dest; i++) {
++                      clean_fname(compare_dest[i], 1);
++                      if (check_exclude(elp, compare_dest[i], 1) < 0)
+                               goto options_rejected;
+               }
+               if (backup_dir) {
+@@ -884,8 +910,8 @@ int parse_arguments(int *argc, const cha
   **/
  void server_options(char **args,int *argc)
  {
@@ -187,7 +208,7 @@ Before compiling, be sure to run "make proto".
        char *arg;
  
        int i, x;
-@@ -1069,13 +1094,16 @@ void server_options(char **args,int *arg
+@@ -1069,13 +1095,16 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }