Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first working version of challenge response authentication. needs
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
9d11b72
..
98af1cd
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-833,6
+833,8
@@
int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
}
sprintf(fnametmp,"%s/.%s.XXXXXX",tmpdir,f);
} else {
}
sprintf(fnametmp,"%s/.%s.XXXXXX",tmpdir,f);
} else {
+ char *f = strrchr(fname,'/');
+
if (strlen(fname)+9 > MAXPATHLEN) {
rprintf(FERROR,"filename too long\n");
if (buf) unmap_file(buf);
if (strlen(fname)+9 > MAXPATHLEN) {
rprintf(FERROR,"filename too long\n");
if (buf) unmap_file(buf);
@@
-840,7
+842,13
@@
int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
continue;
}
continue;
}
- sprintf(fnametmp,".%s.XXXXXX",fname);
+ if (f) {
+ *f = 0;
+ sprintf(fnametmp,"%s/.%s.XXXXXX",fname,f+1);
+ *f = '/';
+ } else {
+ sprintf(fnametmp,".%s.XXXXXX",fname);
+ }
}
if (NULL == do_mktemp(fnametmp)) {
rprintf(FERROR,"mktemp %s failed\n",fnametmp);
}
if (NULL == do_mktemp(fnametmp)) {
rprintf(FERROR,"mktemp %s failed\n",fnametmp);