[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sun Jul 26 07:15:35 UTC 2020


The branch, master has been updated
       via  20660249 Fix issue where rdev major could get out of sync
      from  d274b209 Have release script use patch-update --make (not --shell)

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2066024981a26f5c6b87a390b87524c4c3c9ce93
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sat Jul 25 23:28:44 2020 -0700

    Fix issue where rdev major could get out of sync
    
    If the receiving side read a hard-linked device, it needs to set the
    value of rdev_major to the value it snags from the hard-linked data
    because the sender set their rdev_major value for that file entry.

-----------------------------------------------------------------------

Summary of changes:
 NEWS.md | 8 ++++++--
 flist.c | 5 +++--
 2 files changed, 9 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/NEWS.md b/NEWS.md
index ff943af1..03c0e5cb 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -12,13 +12,17 @@
  - Fixed a bug in the xattr code that was not leaving room for the "rsync."
    prefix in some instances where it needed to be added.
 
- - Restored the ability to use --bwlimit=0 to specify no bandwidth limit.  (It
+ - Restored the ability to use `--bwlimit=0` to specify no bandwidth limit.  (It
    was accidentally broken in 3.2.2.)
 
  - Fix a bug when combining `--delete-missing-args` with `--no-implied-dirs` &
    `-R` where rsync might create the destination path of a missing arg.  The
    code also avoids some superfluous warnings for nested paths of removed args.
 
+ - Fixed an issue where hard-linked devices could cause the rdev_major value to
+   get out of sync between the sender and the receiver, which could cause a
+   device to get created with the wrong major value in its major,minor pair.
+
 ### ENHANCEMENTS:
 
  - Allow `--max-alloc=0` to specify no limit to the alloc sanity check.
@@ -98,7 +102,7 @@
 
  - Apple requires the asm function name to begin with an underscore.
 
- - Avoid a test failure in the daemon test when --atimes is disabled.
+ - Avoid a test failure in the daemon test when `--atimes` is disabled.
 
 ### ENHANCEMENTS:
 
diff --git a/flist.c b/flist.c
index feec96d4..5a1e4245 100644
--- a/flist.c
+++ b/flist.c
@@ -448,7 +448,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
 		if (protocol_version < 28)
 			xflags |= XMIT_SAME_RDEV_pre28;
 		else {
-			rdev = MAKEDEV(major(rdev), 0);
+			rdev = MAKEDEV(rdev_major, 0);
 			xflags |= XMIT_SAME_RDEV_MAJOR;
 			if (protocol_version < 30)
 				xflags |= XMIT_RDEV_MINOR_8_pre30;
@@ -804,7 +804,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
 				gid = F_GROUP(first);
 			if (preserve_devices && IS_DEVICE(mode)) {
 				uint32 *devp = F_RDEV_P(first);
-				rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
+				rdev_major = DEV_MAJOR(devp);
+				rdev = MAKEDEV(rdev_major, DEV_MINOR(devp));
 				extra_len += DEV_EXTRA_CNT * EXTRA_LEN;
 			}
 			if (preserve_links && S_ISLNK(mode))


-- 
The rsync repository.



More information about the rsync-cvs mailing list