popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
--- old/acls.c
+++ new/acls.c
-@@ -0,0 +1,1305 @@
+@@ -0,0 +1,1307 @@
+/* -*- c-file-style: "linux" -*-
+ Copyright (C) Andrew Tridgell 1996
+ Copyright (C) Paul Mackerras 1996
+
+static void ida_list_free(ida_list *idal)
+{
-+ free(idal->idas);
-+ idal->idas = NULL;
-+ idal->count = 0;
-+ idal->malloced = 0;
++ if (idal->idas) {
++ free(idal->idas);
++ idal->idas = NULL;
++ idal->count = 0;
++ idal->malloced = 0;
++ }
+}
+
+static void rsync_acl_free(rsync_acl *racl)
+#endif /* SUPPORT_ACLS */
--- old/backup.c
+++ new/backup.c
-@@ -28,6 +28,7 @@ extern char *backup_suffix;
+@@ -29,6 +29,7 @@ extern char *backup_suffix;
extern char *backup_dir;
extern int am_root;
extern int preserve_devices;
extern int preserve_specials;
extern int preserve_links;
-@@ -132,6 +133,10 @@ static int make_bak_dir(char *fullpath)
+@@ -133,6 +134,10 @@ static int make_bak_dir(char *fullpath)
} else {
do_lchown(fullpath, st.st_uid, st.st_gid);
do_chmod(fullpath, st.st_mode);
}
}
*p = '/';
-@@ -185,6 +190,11 @@ static int keep_backup(char *fname)
+@@ -186,6 +191,11 @@ static int keep_backup(char *fname)
if (!(buf = get_backup_name(fname)))
return 0;
/* Check to see if this is a device file, or link */
if ((am_root && preserve_devices && IS_DEVICE(file->mode))
|| (preserve_specials && IS_SPECIAL(file->mode))) {
-@@ -260,6 +270,10 @@ static int keep_backup(char *fname)
+@@ -261,6 +271,10 @@ static int keep_backup(char *fname)
}
}
set_file_attrs(buf, file, NULL, 0);
--- old/flist.c
+++ new/flist.c
-@@ -44,6 +44,7 @@ extern int filesfrom_fd;
+@@ -40,6 +40,7 @@ extern int filesfrom_fd;
extern int one_file_system;
extern int copy_dirlinks;
extern int keep_dirlinks;
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
-@@ -965,6 +966,11 @@ static struct file_struct *send_file_nam
+@@ -961,6 +962,11 @@ 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);
-@@ -972,6 +978,16 @@ static struct file_struct *send_file_nam
+@@ -968,6 +974,16 @@ static struct file_struct *send_file_nam
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f);
}
return file;
}
-@@ -1360,6 +1376,11 @@ struct file_list *recv_file_list(int f)
+@@ -1356,6 +1372,11 @@ struct file_list *recv_file_list(int f)
flags |= read_byte(f) << 8;
file = receive_file_entry(flist, flags, f);
if (S_ISREG(file->mode) || S_ISLNK(file->mode))
stats.total_size += file->length;
-@@ -1382,6 +1403,11 @@ struct file_list *recv_file_list(int f)
+@@ -1378,6 +1399,11 @@ struct file_list *recv_file_list(int f)
clean_flist(flist, relative_paths, 1);
--- old/options.c
+++ new/options.c
-@@ -45,6 +45,7 @@ int copy_dirlinks = 0;
+@@ -47,6 +47,7 @@ int copy_dirlinks = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
-@@ -192,6 +193,7 @@ static void print_rsync_version(enum log
+@@ -194,6 +195,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -208,6 +210,10 @@ static void print_rsync_version(enum log
+@@ -210,6 +212,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -221,9 +227,9 @@ static void print_rsync_version(enum log
+@@ -223,9 +229,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
-@@ -293,6 +299,9 @@ void usage(enum logcode F)
+@@ -295,6 +301,9 @@ void usage(enum logcode F)
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
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");
-@@ -408,6 +417,9 @@ static struct poptOption long_options[]
+@@ -410,6 +419,9 @@ static struct poptOption long_options[]
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 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 },
-@@ -1066,6 +1078,24 @@ int parse_arguments(int *argc, const cha
+@@ -1068,6 +1080,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. */
-@@ -1508,6 +1538,10 @@ void server_options(char **args,int *arg
+@@ -1510,6 +1540,10 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_gid)
--- old/receiver.c
+++ new/receiver.c
-@@ -46,6 +46,7 @@ extern int keep_partial;
+@@ -48,6 +48,7 @@ extern int keep_partial;
extern int checksum_seed;
extern int inplace;
extern int delay_updates;
extern struct stats stats;
extern char *log_format;
extern char *tmpdir;
-@@ -344,6 +345,10 @@ int recv_files(int f_in, struct file_lis
+@@ -346,6 +347,10 @@ int recv_files(int f_in, struct file_lis
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
int i, recv_ok;
if (verbose > 2)
-@@ -541,7 +546,16 @@ int recv_files(int f_in, struct file_lis
+@@ -543,7 +548,16 @@ int recv_files(int f_in, struct file_lis
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
+exit 0
--- old/uidlist.c
+++ new/uidlist.c
-@@ -34,6 +34,7 @@
+@@ -35,6 +35,7 @@
extern int verbose;
extern int preserve_uid;
extern int preserve_gid;
extern int numeric_ids;
extern int am_root;
-@@ -274,7 +275,7 @@ void send_uid_list(int f)
+@@ -275,7 +276,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) {
-@@ -291,7 +292,7 @@ void send_uid_list(int f)
+@@ -292,7 +293,7 @@ void send_uid_list(int f)
write_int(f, 0);
}
int len;
for (list = gidlist; list; list = list->next) {
if (!list->name)
-@@ -312,7 +313,7 @@ void recv_uid_list(int f, struct file_li
+@@ -313,7 +314,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);
-@@ -324,7 +325,7 @@ void recv_uid_list(int f, struct file_li
+@@ -325,7 +326,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);
-@@ -336,6 +337,16 @@ void recv_uid_list(int f, struct file_li
+@@ -337,6 +338,16 @@ void recv_uid_list(int f, struct file_li
}
}