#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
-@@ -491,6 +494,9 @@ static struct file_struct *receive_file_
+@@ -495,6 +498,9 @@ 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;
OFF_T file_length;
char *basename, *dirname, *bp;
struct file_struct *file;
-@@ -594,13 +600,27 @@ static struct file_struct *receive_file_
+@@ -598,13 +604,27 @@ static struct file_struct *receive_file_
sum_len = always_checksum && S_ISREG(mode) ? MD4_SUM_LENGTH : 0;
file->modtime = modtime;
file->length = file_length;
-@@ -695,6 +715,11 @@ static struct file_struct *receive_file_
+@@ -699,6 +719,11 @@ static struct file_struct *receive_file_
read_buf(f, sum, checksum_len);
}
return file;
}
-@@ -944,6 +969,9 @@ static struct file_struct *send_file_nam
+@@ -949,6 +974,9 @@ static struct file_struct *send_file_nam
unsigned short flags)
{
struct file_struct *file;
file = make_file(fname, flist, stp, flags,
f == -2 ? SERVER_FILTERS : ALL_FILTERS);
-@@ -953,6 +981,15 @@ static struct file_struct *send_file_nam
+@@ -958,6 +986,15 @@ static struct file_struct *send_file_nam
if (chmod_modes && !S_ISLNK(file->mode))
file->mode = tweak_mode(file->mode, chmod_modes);
maybe_emit_filelist_progress(flist->count + flist_count_offset);
flist_expand(flist);
-@@ -960,6 +997,15 @@ static struct file_struct *send_file_nam
+@@ -965,6 +1002,15 @@ static struct file_struct *send_file_nam
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f);
- itemize(file, ndx, real_ret, &real_st,
+#ifdef SUPPORT_ACLS
+ if (preserve_acls && real_ret == 0)
-+ get_acl(fname, &real_sx);
++ get_acl(fnamecmp, &real_sx);
+#endif
+ itemize(file, ndx, real_ret, &real_sx,
0, 0, NULL);
extern int make_backups;
extern int remove_source_files;
extern int stdout_format_has_i;
-@@ -145,15 +146,19 @@ void init_hard_links(void)
+@@ -147,15 +148,19 @@ void init_hard_links(void)
#ifdef SUPPORT_HARD_LINKS
static int maybe_hard_link(struct file_struct *file, int ndx,
ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS,
0, "");
}
-@@ -168,13 +173,13 @@ static int maybe_hard_link(struct file_s
+@@ -170,13 +175,13 @@ static int maybe_hard_link(struct file_s
return -1;
}
}
enum logcode code, int skip)
{
#ifdef SUPPORT_HARD_LINKS
-@@ -215,7 +220,7 @@ int hard_link_check(struct file_struct *
+@@ -217,7 +222,7 @@ int hard_link_check(struct file_struct *
|| st2.st_ino != st3.st_ino)
continue;
statret = 1;
if (verbose < 2 || !stdout_format_has_i) {
itemizing = 0;
code = FNONE;
-@@ -225,12 +230,16 @@ int hard_link_check(struct file_struct *
+@@ -227,12 +232,16 @@ int hard_link_check(struct file_struct *
if (!unchanged_file(cmpbuf, file, &st3))
continue;
statret = 1;
toname, &st2, itemizing, code);
if (remove_source_files == 1 && do_xfers) {
char numbuf[4];
-@@ -248,7 +257,7 @@ int hard_link_check(struct file_struct *
+@@ -250,7 +259,7 @@ int hard_link_check(struct file_struct *
#ifdef SUPPORT_HARD_LINKS
int hard_link_one(struct file_struct *file, int ndx, char *fname,
int itemizing, enum logcode code)
{
if (do_link(toname, fname)) {
-@@ -264,7 +273,11 @@ int hard_link_one(struct file_struct *fi
+@@ -266,7 +275,11 @@ int hard_link_one(struct file_struct *fi
}
if (itemizing) {
ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0,
terse ? "" : toname);
}
-@@ -281,11 +294,12 @@ void hard_link_cluster(struct file_struc
+@@ -283,11 +296,12 @@ void hard_link_cluster(struct file_struc
#ifdef SUPPORT_HARD_LINKS
char hlink1[MAXPATHLEN];
char *hlink2;
return;
if (!(file->flags & FLAG_HLINK_TOL)) {
while (!(file->flags & FLAG_HLINK_EOL)) {
-@@ -299,9 +313,13 @@ void hard_link_cluster(struct file_struc
+@@ -301,9 +315,13 @@ void hard_link_cluster(struct file_struc
if (file->F_HLINDEX != SKIPPED_LINK)
continue;
hlink2 = f_name(file, NULL);
+int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype);
--- old/log.c
+++ new/log.c
-@@ -615,8 +615,10 @@ static void log_formatted(enum logcode c
+@@ -606,8 +606,10 @@ static void log_formatted(enum logcode c
n[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
n[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
n[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
{"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 },
-@@ -1082,6 +1094,24 @@ int parse_arguments(int *argc, const cha
+@@ -1085,6 +1097,24 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1523,6 +1553,10 @@ void server_options(char **args,int *arg
+@@ -1526,6 +1556,10 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
extern int numeric_ids;
extern int am_root;
-@@ -275,7 +276,7 @@ void send_uid_list(int f)
+@@ -273,7 +274,7 @@ void send_uid_list(int f)
if (numeric_ids)
return;
int len;
/* we send sequences of uid/byte-length/name */
for (list = uidlist; list; list = list->next) {
-@@ -292,7 +293,7 @@ void send_uid_list(int f)
+@@ -290,7 +291,7 @@ void send_uid_list(int f)
write_int(f, 0);
}
int len;
for (list = gidlist; list; list = list->next) {
if (!list->name)
-@@ -313,7 +314,7 @@ void recv_uid_list(int f, struct file_li
+@@ -311,7 +312,7 @@ void recv_uid_list(int f, struct file_li
int id, i;
char *name;
/* read the uid list */
while ((id = read_int(f)) != 0) {
int len = read_byte(f);
-@@ -325,7 +326,7 @@ void recv_uid_list(int f, struct file_li
+@@ -323,7 +324,7 @@ void recv_uid_list(int f, struct file_li
}
}
/* read the gid list */
while ((id = read_int(f)) != 0) {
int len = read_byte(f);
-@@ -337,6 +338,16 @@ void recv_uid_list(int f, struct file_li
+@@ -335,6 +336,16 @@ void recv_uid_list(int f, struct file_li
}
}