summaryrefslogtreecommitdiff
path: root/xattrs.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-04-26 07:28:55 -0700
committerWayne Davison <wayned@samba.org>2009-04-26 07:43:32 -0700
commita8e6e1486960fe2e9ac190ad53e9830f0f3f900a (patch)
tree3468f982f5fb605a0d882fe1d19c096502111d59 /xattrs.c
parent307555eba3720362922cf25c15991b21f0e72dab (diff)
downloadrsync-a8e6e1486960fe2e9ac190ad53e9830f0f3f900a.tar.gz
Change sending/receiving/storing of the rdev value for special files.
Since the value is not needed, protocol 31 no longer sends it, while older protocols are optimized so the sender just sends a valid rdev value as efficiently as possible. The receiver no longer caches an rdev value for special files, and the generator will always pass a 0 rdev value to do_mknod() for special files. Fixes bug #6280.
Diffstat (limited to 'xattrs.c')
-rw-r--r--xattrs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xattrs.c b/xattrs.c
index b9034751..0eceb393 100644
--- a/xattrs.c
+++ b/xattrs.c
@@ -990,7 +990,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
fst.st_mode &= (_S_IFMT | CHMOD_BITS);
fmode = new_mode & (_S_IFMT | CHMOD_BITS);
- if (IS_DEVICE(fmode) || IS_SPECIAL(fmode)) {
+ if (IS_DEVICE(fmode)) {
uint32 *devp = F_RDEV_P(file);
rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
} else
@@ -1001,7 +1001,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
| (S_ISDIR(fst.st_mode) ? 0700 : 0600);
if (fst.st_mode != mode)
do_chmod(fname, mode);
- if (!IS_DEVICE(fst.st_mode) && !IS_SPECIAL(fst.st_mode))
+ if (!IS_DEVICE(fst.st_mode))
fst.st_rdev = 0; /* just in case */
if (mode == fmode && fst.st_rdev == rdev