Silence some symlink mode-change failures.
authorWayne Davison <wayne@opencoder.net>
Tue, 18 Jan 2022 06:12:21 +0000 (22:12 -0800)
committerWayne Davison <wayne@opencoder.net>
Tue, 18 Jan 2022 06:23:31 +0000 (22:23 -0800)
NEWS.md
generator.c
syscall.c

diff --git a/NEWS.md b/NEWS.md
index a2734d524a1abbb8e7049425be7f2830a8044b5b..3083ca3a84327136c91594a4d2ea383bac7fcddd 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -94,6 +94,9 @@
  - Tweak --progress to display "`??:??:??`" when the time-remaining value is so
    large as to be meaningless.
 
+ - Silence some chmod warnings about symlinks when it looks like we have a
+   function to set their permissions but they can't really be set.
+
 ### ENHANCEMENTS:
 
  - Use openssl's `-verify_hostname` option in the rsync-ssl script.
  - Try to support a client that sent a remote rsync a wacko stderr file handle
    (such as an older File::RsyncP perl library used by BackupPC).
 
- - Some man page improvements.
+ - Lots of man page improvements, including better html versions.
 
 ### PACKAGING RELATED:
 
index 3a45b4bd4d29945b29694cd6d1e28acade5d84f6..454fd19f347ba8456297b44ad0e02788a6f93f21 100644 (file)
@@ -532,7 +532,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                                iflags |= ITEM_REPORT_CRTIME;
                }
 #endif
-#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
+#ifndef CAN_CHMOD_SYMLINK
                if (S_ISLNK(file->mode)) {
                        ;
                } else
index c037349b39d36efeb2ac8c745cf719fdef76104a..f6a7b0af61cc239986af237e6cdd9fce173d71ae 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -257,7 +257,10 @@ int do_chmod(const char *path, mode_t mode)
                        memset(&attrList, 0, sizeof attrList);
                        attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
                        attrList.commonattr = ATTR_CMN_ACCESSMASK;
-                       code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW);
+                       if ((code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW)) == 0)
+                               break;
+                       if (errno == ENOTSUP)
+                               code = 1;
 # else
                        code = 1;
 # endif