extern unsigned int file_struct_len;
/* === ACL structures === */
-@@ -749,6 +750,10 @@ void receive_acl(struct file_struct *fil
+@@ -743,6 +744,10 @@ void receive_acl(struct file_struct *fil
type = SMB_ACL_TYPE_ACCESS;
racl_list = &access_acl_list;
ndx_ptr = (char*)file + file_struct_len;
do {
char tag = read_byte(f);
int ndx;
-@@ -807,6 +812,10 @@ void cache_acl(struct file_struct *file,
+@@ -801,6 +806,10 @@ void cache_acl(struct file_struct *file,
racl = sxp->acc_acl;
racl_list = &access_acl_list;
ndx_ptr = (char*)file + file_struct_len;
do {
if (!racl)
ndx = -1;
-@@ -922,6 +931,10 @@ int set_acl(const char *fname, const str
+@@ -916,6 +925,10 @@ int set_acl(const char *fname, const str
type = SMB_ACL_TYPE_ACCESS;
ndx_ptr = (char*)file + file_struct_len;
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
-@@ -502,7 +503,7 @@ static struct file_struct *receive_file_
+@@ -494,7 +495,7 @@ static struct file_struct *receive_file_
char thisname[MAXPATHLEN];
unsigned int l1 = 0, l2 = 0;
int alloc_len, basename_len, dirname_len, linkname_len, sum_len;
int xtra_len;
#endif
OFF_T file_length;
-@@ -614,10 +615,16 @@ static struct file_struct *receive_file_
+@@ -606,10 +607,16 @@ static struct file_struct *receive_file_
xtra_len = (S_ISDIR(mode) ? 2 : 1) * 4;
else
xtra_len = 0;
+ xtra_len
#endif
+ linkname_len + sum_len;
-@@ -626,7 +633,7 @@ static struct file_struct *receive_file_
+@@ -618,7 +625,7 @@ static struct file_struct *receive_file_
file = (struct file_struct *)bp;
memset(bp, 0, file_struct_len);
bp += file_struct_len;
bp += xtra_len;
#endif
-@@ -727,6 +734,10 @@ static struct file_struct *receive_file_
+@@ -717,6 +724,10 @@ static struct file_struct *receive_file_
if (preserve_acls)
receive_acl(file, f);
#endif
return file;
}
-@@ -997,6 +1008,13 @@ static struct file_struct *send_file_nam
+@@ -987,6 +998,13 @@ static struct file_struct *send_file_nam
return NULL;
}
#endif
maybe_emit_filelist_progress(flist->count + flist_count_offset);
-@@ -1009,11 +1027,19 @@ static struct file_struct *send_file_nam
+@@ -999,11 +1017,19 @@ static struct file_struct *send_file_nam
if (preserve_acls)
send_acl(&sx, f);
#endif
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
-@@ -196,6 +197,7 @@ static void print_rsync_version(enum log
+@@ -200,6 +201,7 @@ static void print_rsync_version(enum log
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *acls = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -215,7 +217,9 @@ static void print_rsync_version(enum log
+@@ -219,7 +221,9 @@ static void print_rsync_version(enum log
#ifdef SUPPORT_ACLS
acls = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -229,9 +233,9 @@ static void print_rsync_version(enum log
+@@ -233,9 +237,9 @@ static void print_rsync_version(enum log
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -304,6 +308,9 @@ void usage(enum logcode F)
+@@ -308,6 +312,9 @@ void usage(enum logcode F)
#ifdef SUPPORT_ACLS
rprintf(F," -A, --acls preserve ACLs (implies --perms)\n");
#endif
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
-@@ -422,6 +429,9 @@ static struct poptOption long_options[]
+@@ -427,6 +434,9 @@ static struct poptOption long_options[]
{"acls", 'A', POPT_ARG_NONE, 0, 'A', 0, 0 },
{"no-acls", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
{"no-A", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
-@@ -1099,6 +1109,17 @@ int parse_arguments(int *argc, const cha
+@@ -1109,6 +1119,17 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
-@@ -1538,6 +1559,10 @@ void server_options(char **args,int *arg
+@@ -1560,6 +1581,10 @@ void server_options(char **args,int *arg
if (preserve_acls)
argstr[x++] = 'A';
#endif
+++ new/rsync.c
@@ -34,6 +34,7 @@ extern int verbose;
extern int dry_run;
- extern int daemon_log_format_has_i;
+ extern int logfile_format_has_i;
extern int preserve_acls;
+extern int preserve_xattrs;
extern int preserve_perms;
if ((sxp->st.st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS)) {
--- old/rsync.h
+++ new/rsync.h
-@@ -494,6 +494,10 @@ struct idev {
+@@ -495,6 +495,10 @@ struct idev {
#define ACLS_NEED_MASK 1
#endif
#define GID_NONE ((gid_t)-1)
#define HL_CHECK_MASTER 0
-@@ -686,6 +690,9 @@ typedef struct {
+@@ -687,6 +691,9 @@ typedef struct {
struct rsync_acl *acc_acl; /* access ACL */
struct rsync_acl *def_acl; /* default ACL */
#endif
--chmod=CHMOD change destination permissions
-o, --owner preserve owner (super-user only)
-g, --group preserve group
-@@ -807,6 +808,11 @@ version makes it incompatible with sendi
+@@ -809,6 +810,11 @@ version makes it incompatible with sendi
rsync unless you double the bf(--acls) option (e.g. bf(-AA)). This
doubling is not needed when pulling files from an older rsync.