search for: md4_sum_length

Displaying 18 results from an estimated 18 matches for "md4_sum_length".

2005 Jul 26
1
[patch] paranoid checksum checking
...the originating location. This + is a further paranoia check, just to make sure that + we really have successfully transferred the file. */ + if (recv_ok && ! am_server && always_checksum) { + char csum[MD4_SUM_LENGTH + 1]; + file_checksum (fnametmp, csum, file->length); + if (memcmp(csum, file->u.sum, MD4_SUM_LENGTH) != 0) { + rprintf (FERROR, "%s checksum does not match remote checksum\n", +...
2003 Mar 22
2
[RFC] protocol version
I'm in the midst of coding a patch set for consideration that will bump the protocol version and have a couple of observations. The current minimum backwards-compatible protocol is 15 but we have code that checks for protocol versions as old as 12. If someone else doesn't beat me to it i'm considering cleaning out the pre-15 compatibility code. A backwards compatibility patch could
2003 May 20
0
patch for better handling of write failures (disk full)
...g John Van Essen's write_file() patch from: http://lists.samba.org/pipermail/rsync/2003-April/010511.html diff -Nru a/rsync/receiver.c b/rsync/receiver.c --- a/rsync/receiver.c Tue May 20 08:56:43 2003 +++ b/rsync/receiver.c Tue May 20 08:56:43 2003 @@ -214,6 +214,7 @@ static char file_sum1[MD4_SUM_LENGTH]; static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; + int discard = 0; count = read_int(f_in); n = read_int(f_in); @@ -240,7 +241,9 @@ if (fd != -1 && write_file(fd,data,i) != i) { rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno)); - e...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch? Thanks for the reminder. I've just committed Jos's rsync+ patch onto the "branch_mbp_rsyncplus_merge" branch. If it works OK and nobody screams I will move it across onto the main tree tomorrow or Wednesday. I see the patch doesn't add documentation about the new options to the man page, so we should fix that in the future.
2003 May 23
1
PATCH: better handling for write failures (disk full)
...Van Essen's write_file() patch from: http://lists.samba.org/pipermail/rsync/2003-April/010511.html John diff -Nru a/rsync/receiver.c b/rsync/receiver.c --- a/rsync/receiver.c Tue May 20 08:56:43 2003 +++ b/rsync/receiver.c Tue May 20 08:56:43 2003 @@ -214,6 +214,7 @@ static char file_sum1[MD4_SUM_LENGTH]; static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; + int discard = 0; count = read_int(f_in); n = read_int(f_in); @@ -240,7 +241,9 @@ if (fd != -1 && write_file(fd,data,i) != i) { rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno)); - e...
2002 Aug 05
5
[patch] read-devices
...} mdfour_result(&m, (uchar *)sum); } -void file_checksum(char *fname,char *sum,OFF_T size) +void file_checksum(char *fname,char *sum) { - OFF_T i; + OFF_T i = 0; struct map_struct *buf; int fd; - OFF_T len = size; char tmpchunk[CSUM_CHUNK]; struct mdfour m; memset(sum,0,MD4_SUM_LENGTH); fd = do_open(fname, O_RDONLY, 0); if (fd == -1) return; - buf = map_file(fd,size); + buf = map_file(fd,OFF_T_MAX); /* map_ptr() will find out the real file size */ mdfour_begin(&m); - for(i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) { - memcpy(tmpchunk, map_ptr(buf,i,CS...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...Sat Mar 29 11:11:30 2003 +++ receiver.c Sat Mar 29 12:16:23 2003 @@ -230,7 +230,8 @@ OFF_T total_size) { int i; - unsigned int n,remainder,len,count; + struct sum_struct sum; + unsigned int len; OFF_T offset = 0; OFF_T offset2; char *data; @@ -238,9 +239,7 @@ static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; - count = read_int(f_in); - n = read_int(f_in); - remainder = read_int(f_in); + read_sum_head(f_in, &sum); sum_init(); @@ -270,10 +269,10 @@ } i = -(i+1); - offset2 = i*(OFF_T)n; - len = n; - if (i == (int) count-1 && remainder != 0) - len =...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...pdate(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -316,6 +323,9 @@ } sum_end(file_sum1); + if (md4) { + mdfour_result(&mdfour_data, (unsigned char*)md4); + } read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -351,6 +361,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_stats; if (verbose > 2) { @@ -416,7 +427,7 @@ if (fd1 != -1 && do_fstat(fd1,&st) != 0) { r...
2004 Apr 27
1
rsync-2.6.1 close() fixes
..._in,struct exit_cleanup(RERR_FILEIO); } + if (do_fsync && (fd != -1) && (fsync(fd) != 0)) { + rprintf(FERROR, "fsync failed on %s: %s\n", + full_fname(fname), strerror(errno)); + exit_cleanup(RERR_FILEIO); + } + sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); @@ -458,7 +465,11 @@ int recv_files(int f_in,struct file_list if (fd1 != -1) { close(fd1); } - close(fd2); + if (close(fd2) != 0) { + rprintf(FERROR, "close failed on %s: %s\n", + full_fname(fnametmp), strerror(errno)); + exit_cleanup(RERR_FILEIO); + } if (verbo...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st) != 0) { r...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st) != 0) { r...
2003 Dec 20
3
preview release: 2.6.0pre1
OK, I packaged up the current CVS as our first preview release for 2.6.0. You can grab it here: http://samba.org/ftp/rsync/preview/rsync-2.6.0pre1.tar.gz The MD5 checksum is: 70e9dea967f083c231b7821ef35aef1b rsync-2.6.0pre1.tar.gz There is not currently a .sig file for the package, but I'm looking into that next. Please test this and let me know if we have any remaining issues
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st) != 0) { r...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...sum_update(map,len); + if (md4) + mdfour_update(&mdfour_data,map,len); } if (fd != -1 && write_file(fd,map,len) != (int) len) { @@ -265,6 +272,8 @@ } sum_end(file_sum1); + if (md4) + mdfour_result(&mdfour_data, (unsigned char*)md4); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); if (verbose > 2) { @@ -299,6 +308,7 @@ extern int preserve_perms; extern int delete_after; extern int orig_umask; + extern char *link_by_hash_dir; struct stats initial_stats; if (verbose > 2) { @@ -372,7 +382,7 @@ if (fd1 != -1 && do_fstat(fd1,&st) != 0) { r...
2004 Apr 15
0
Multiple compare-dest args
...23:17.000000000 +0200 @@ -41,7 +41,7 @@ extern int io_timeout; extern int protocol_version; extern int always_checksum; -extern char *compare_dest; +extern char *compare_dest[]; extern int link_dest; @@ -69,13 +69,13 @@ if (always_checksum && S_ISREG(st->st_mode)) { char sum[MD4_SUM_LENGTH]; char fnamecmpdest[MAXPATHLEN]; + int i = 0; - if (compare_dest != NULL) { - if (access(fname, 0) != 0) { - pathjoin(fnamecmpdest, sizeof fnamecmpdest, - compare_dest, fname); - fname = fnamecmpdest; - } + while ((access(fname, 0) != 0) && compare_dest[i] != NULL) {...
2003 Mar 23
1
[RFC] dynamic checksum size
...22 08:23:21 2003 +++ receiver.c.dynsumlen Sat Mar 22 09:47:43 2003 @@ -207,7 +207,8 @@ OFF_T total_size) { int i; - unsigned int n,remainder,len,count; + struct sum_struct sum; + unsigned int len; OFF_T offset = 0; OFF_T offset2; char *data; @@ -215,9 +216,7 @@ static char file_sum2[MD4_SUM_LENGTH]; char *map=NULL; - count = read_int(f_in); - n = read_int(f_in); - remainder = read_int(f_in); + read_sum_head(f_in, &sum); sum_init(); @@ -247,10 +246,10 @@ } i = -(i+1); - offset2 = i*(OFF_T)n; - len = n; - if (i == (int) count-1 && remainder != 0) - len =...
2004 Jun 17
1
[PATCH] make write_batch local
...***** *** 46,51 **** --- 46,52 ---- extern int module_id; extern int ignore_errors; extern int orig_umask; + extern int write_batch; extern int keep_partial; extern int checksum_seed; *************** *** 279,284 **** --- 280,287 ---- sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); + if (write_batch) + write_batch_delta_file(file_sum2, MD4_SUM_LENGTH); if (verbose > 2) { rprintf(FINFO,"got file_sum\n"); } *************** *** 334,339 **** --- 337,345 ---- continue; } + if (write_batch) + write_batch_delta_file((char *) &i, sizeo...
2004 Feb 06
4
memory reduction
...) +void receive_file_entry(struct file_struct **fptr, unsigned short flags, + struct file_list *flist, int f) { static time_t modtime; static mode_t mode; @@ -616,12 +616,12 @@ void receive_file_entry(struct file_stru idev_len = 0; sum_len = always_checksum && S_ISREG(mode) ? MD4_SUM_LENGTH : 0; - file_struct_len = idev_len? sizeof file[0] : min_file_struct_len; + file_struct_len = min_file_struct_len; alloc_len = file_struct_len + dirname_len + basename_len - + linkname_len + sum_len + idev_len; - if (!(bp = new_array(char, alloc_len))) - out_of_memory("receive_file_entr...