Displaying 5 results from an estimated 5 matches for "max_digest_len".
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...tern int preserve_xattrs;
extern int basis_dir_cnt;
extern int make_backups;
@@ -165,6 +166,7 @@
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
const char *fname, int fd, OFF_T total_size)
{
+ STRUCT_STAT st;
static char file_sum1[MAX_DIGEST_LEN];
static char file_sum2[MAX_DIGEST_LEN];
struct map_struct *mapbuf;
@@ -285,10 +287,14 @@
goto report_write_error;
#ifdef HAVE_FTRUNCATE
- if (inplace && fd != -1
- && ftruncate(fd, offset) < 0) {
- rsyserr(FERROR_XFER,...
2023 May 16
1
xfer_sum_len type bug
...c 2023-05-16 14:17:31.082521665 -0400
+++ rsync-3.2.7.patched/match.c 2023-05-16 15:36:46.781895867 -0400
@@ -32,7 +32,7 @@
extern int append_mode;
extern struct name_num_item *xfer_sum_nni;
-extern int xfer_sum_len;
+extern size_t xfer_sum_len;
int updating_basis_file;
char sender_file_sum[MAX_DIGEST_LEN];
diff -Naur rsync-3.2.7.patch_orig/receiver.c rsync-3.2.7.patched/receiver.c
--- rsync-3.2.7.patch_orig/receiver.c 2023-05-16 14:17:31.082521665 -0400
+++ rsync-3.2.7.patched/receiver.c 2023-05-16 15:37:10.401929552 -0400
@@ -75,7 +75,7 @@
extern OFF_T preallocated_len;
extern struct name_num_...
2017 Feb 07
2
[Bug 12568] New: Integer overflow still affects xattrs.c
...rflow is found in xattrs.c:692.
The code snippet is as follows.
684 for (num = 1; num <= count; num++) {
685 char *ptr, *name;
686 rsync_xa *rxa;
687 size_t name_len = read_varint(f);
688 size_t datum_len = read_varint(f);
689 size_t dget_len = datum_len > MAX_FULL_DATUM ? 1 + MAX_DIGEST_LEN :
datum_len;
690 size_t extra_len = MIGHT_NEED_RPRE ? RPRE_LEN : 0;
691 if ((dget_len + extra_len < dget_len)
692 || (dget_len + extra_len + name_len < dget_len))
693 overflow_exit("receive_xattr");
694 ptr = new_array(char, dget_len + extra_len + name_len);
695...
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
...input, n);
+ md5_result(&ctx, out);
+}
+
int main(int argc, char *argv[])
{
FILE *f;
diff --git a/lib/mdigest.h b/lib/mdigest.h
index e0e33ed364c83..6f5ec33ef3b33 100644
--- a/lib/mdigest.h
+++ b/lib/mdigest.h
@@ -2,7 +2,8 @@
#define MD4_DIGEST_LEN 16
#define MD5_DIGEST_LEN 16
-#define MAX_DIGEST_LEN MD5_DIGEST_LEN
+#define SHA1_DIGEST_LEN 20
+#define MAX_DIGEST_LEN SHA1_DIGEST_LEN
#define CSUM_CHUNK 64
@@ -19,8 +20,80 @@ void mdfour_result(md_context *md, uchar digest[MD4_DIGEST_LEN]);
void get_mdfour(uchar digest[MD4_DIGEST_LEN], const uchar *in, int length);
+#ifdef HAVE_OPENSSL
+#...
2010 Jun 15
3
about rsyncing of block devices
Hiya,
I can see it's a regular subject on this list.
I, like others wanted to use rsync to synchronise two block
devices (as it happens one lvm volume and one nbd device served
by qemu-img on a remote host from a qcow2 disk image so that I
can keep the old versions)
As I couldn't find any report of it being done successfully,
I'm just sharing my findings as it might benefit others.