Some demon_log_* variables changed into logfile_* variables that are
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index 3c6cb4c..501a02e 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -37,7 +37,6 @@ extern int numeric_ids;
 extern int recurse;
 extern int xfer_dirs;
 extern int filesfrom_fd;
-extern int curr_dir_depth;
 extern int one_file_system;
 extern int copy_dirlinks;
 extern int keep_dirlinks;
@@ -1069,6 +1068,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
 
        io_start_buffering_out();
        if (filesfrom_fd >= 0) {
+               if (sanitize_paths)
+                       die_on_unsafe_path(argv[0], 0);
                if (argv[0] && !push_dir(argv[0])) {
                        rsyserr(FERROR, errno, "push_dir %s failed",
                                full_fname(argv[0]));
@@ -1122,6 +1123,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                                   && (len == 1 || fbuf[len-2] == '/');
                }
 
+               if (sanitize_paths)
+                       die_on_unsafe_path(fbuf, 1);
                if (link_stat(fbuf, &st, copy_dirlinks) != 0) {
                        io_error |= IOERR_GENERAL;
                        rsyserr(FERROR, errno, "link_stat %s failed",