added DNS spoofing test to host access control
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index e120f80..d3c07ed 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -262,6 +262,12 @@ static void receive_file_entry(struct file_struct **fptr,
 
   clean_fname(thisname);
 
+  if (relative_paths && thisname[0] == '/') {
+         /* strip / off absolute paths in destination */
+         memmove(thisname, thisname+1, strlen(thisname));
+         if (!thisname[0]) strcpy(thisname,".");
+  }
+
   if ((p = strrchr(thisname,'/'))) {
          static char *lastdir;
          *p = 0;
@@ -403,10 +409,6 @@ static struct file_struct *make_file(char *fname)
 
        file->modtime = st.st_mtime;
        file->length = st.st_size;
-#if TRIDGE
-       if (st.st_size == 71036)
-               file->length += 7000;
-#endif
        file->mode = st.st_mode;
        file->uid = st.st_uid;
        file->gid = st.st_gid;