#define ITEM_REPORT_CHANGE (1<<1)
#define ITEM_REPORT_SIZE (1<<2) /* regular files only */
#define ITEM_REPORT_TIMEFAIL (1<<2) /* symlinks only */
-@@ -689,6 +691,7 @@ extern int file_extra_cnt;
+@@ -693,6 +695,7 @@ extern int file_extra_cnt;
extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
extern int fileflags_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -696,6 +699,7 @@ extern int xattrs_ndx;
+@@ -700,6 +703,7 @@ extern int xattrs_ndx;
#define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
#define EXTRA_LEN (sizeof (union file_extras))
#define PTR_EXTRA_CNT ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
#define DEV_EXTRA_CNT 2
#define DIRNODE_EXTRA_CNT 3
#define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
-@@ -975,6 +979,7 @@ typedef struct {
+@@ -979,6 +983,7 @@ typedef struct {
typedef struct {
STRUCT_STAT st;
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1106,6 +1107,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1110,6 +1111,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(--super)) This tells the receiving side to attempt super-user
activities even if the receiving rsync wasn't run by the super-user. These
activities include: preserving users via the bf(--owner) option, preserving
-@@ -1918,7 +1922,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1922,7 +1926,7 @@ with older versions of rsync, but that also turns on the output of other
verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
type of update being done, bf(X) is replaced by the file-type, and the
other letters represent attributes that may be output if they are being
modified.
-@@ -1977,6 +1981,8 @@ quote(itemization(
+@@ -1981,6 +1985,8 @@ quote(itemization(
it() The bf(f) means that the fileflags information changed.
it() The bf(a) means that the ACL information changed.
it() The bf(x) means that the extended attribute information changed.
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-@@ -38,6 +38,11 @@ extern int force_change;
+@@ -38,6 +38,14 @@ extern int force_change;
extern int preserve_perms;
extern int preserve_executability;
++#pragma pack(push)
++#pragma pack(4)
+struct create_time {
+ uint32 length;
+ struct timespec crtime;
+};
++#pragma pack(pop)
+
#define RETURN_ERROR_IF(x,e) \
do { \
if (x) { \
-@@ -437,3 +442,33 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
+@@ -439,3 +447,33 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
return lseek(fd, offset, whence);
#endif
}
./configure
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: afccb3d3263b4867eb0a22cf29a3bb75f4cf0d71
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
+#endif
if (counter >= loopchk_limit) {
if (allowed_lull)
- maybe_send_keepalive(time(NULL), True);
+ maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
#define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
#define ITEM_XNAME_FOLLOWS (1<<12)
#define ITEM_IS_NEW (1<<13)
-@@ -494,6 +497,28 @@ typedef unsigned int size_t;
+@@ -498,6 +501,28 @@ typedef unsigned int size_t;
#endif
#endif
/* Find a variable that is either exactly 32-bits or longer.
* If some code depends on 32-bit truncation, it will need to
* take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -664,6 +689,7 @@ extern int file_extra_cnt;
+@@ -668,6 +693,7 @@ extern int file_extra_cnt;
extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -705,6 +731,11 @@ extern int xattrs_ndx;
+@@ -709,6 +735,11 @@ extern int xattrs_ndx;
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
See also bf(--keep-dirlinks) for an analogous option for the receiving
side.
-@@ -1013,6 +1018,29 @@ super-user copies all namespaces except system.*. A normal user only copies
- the user.* namespace. To be able to backup and restore non-user namespaces as
- a normal user, see the bf(--fake-super) option.
+@@ -1017,6 +1022,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those
+ used by bf(--fake-super)) unless you repeat the option (e.g. -XX). This
+ "copy all xattrs" mode cannot be used with bf(--fake-super).
+dit(bf(--fileflags)) This option causes rsync to update the file-flags to be
+the same as the source files and directories (if your OS supports the
dit(bf(--chmod)) This option tells rsync to apply one or more
comma-separated "chmod" strings to the permission of the files in the
transfer. The resulting value is treated as though it were the permissions
-@@ -1301,12 +1329,13 @@ display as a "*missing" entry in the bf(--list-only) output.
+@@ -1305,12 +1333,13 @@ display as a "*missing" entry in the bf(--list-only) output.
dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
even when there are I/O errors.
bf(--recursive) option was also enabled.
dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
-@@ -1889,7 +1918,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1893,7 +1922,7 @@ with older versions of rsync, but that also turns on the output of other
verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
type of update being done, bf(X) is replaced by the file-type, and the
other letters represent attributes that may be output if they are being
modified.
-@@ -1945,7 +1974,7 @@ quote(itemization(
+@@ -1949,7 +1978,7 @@ quote(itemization(
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
{
int code;
if (dry_run) return 0;
-@@ -211,17 +266,74 @@ int do_chmod(const char *path, mode_t mode)
- #endif
+@@ -213,17 +268,74 @@ int do_chmod(const char *path, mode_t mode)
} else
code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
+ #endif /* !HAVE_LCHMOD */
+#ifdef SUPPORT_FORCE_CHANGE
+ if (code < 0 && force_change && errno == EPERM && !S_ISLNK(mode)) {
+ if (fileflags == NO_FFLAGS) {