Use the new calling syntax for sanitize_path().
authorWayne Davison <wayned@samba.org>
Wed, 3 May 2006 00:48:20 +0000 (00:48 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 3 May 2006 00:48:20 +0000 (00:48 +0000)
exclude.c
options.c

index eb2353c..0da15b2 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -298,7 +298,7 @@ static char *parse_merge_name(const char *merge_file, unsigned int *len_ptr,
                        strlcpy(to, merge_file, *len_ptr + 1);
                        merge_file = to;
                }
-               if (!sanitize_path(fn, merge_file, r, dirbuf_depth)) {
+               if (!sanitize_path(fn, merge_file, r, dirbuf_depth, NULL)) {
                        rprintf(FERROR, "merge-file name overflows: %s\n",
                                merge_file);
                        return NULL;
index a80da6a..14071c8 100644 (file)
--- a/options.c
+++ b/options.c
@@ -891,7 +891,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                case OPT_INCLUDE_FROM:
                        arg = poptGetOptArg(pc);
                        if (sanitize_paths)
-                               arg = sanitize_path(NULL, arg, NULL, 0);
+                               arg = sanitize_path(NULL, arg, NULL, 0, NULL);
                        if (server_filter_list.head) {
                                char *cp = strdup(arg);
                                if (!cp)
@@ -1208,13 +1208,13 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
        if (sanitize_paths) {
                int i;
                for (i = *argc; i-- > 0; )
-                       (*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0);
+                       (*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0, NULL);
                if (tmpdir)
-                       tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
+                       tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL);
                if (partial_dir)
-                       partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
+                       partial_dir = sanitize_path(NULL, partial_dir, NULL, 0, NULL);
                if (backup_dir)
-                       backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
+                       backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
@@ -1410,7 +1410,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                        }
                } else {
                        if (sanitize_paths)
-                               files_from = sanitize_path(NULL, files_from, NULL, 0);
+                               files_from = sanitize_path(NULL, files_from, NULL, 0, NULL);
                        if (server_filter_list.head) {
                                if (!*files_from)
                                        goto options_rejected;