+}
+
+#endif /* SUPPORT_ACLS */
---- orig/backup.c 2005-02-07 20:41:56
+--- orig/backup.c 2005-02-14 02:45:09
+++ backup.c 2004-10-06 00:13:09
@@ -121,6 +121,7 @@ static int make_bak_dir(char *fullpath)
} else {
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2005-02-13 21:17:16
-+++ flist.c 2005-02-13 21:58:44
-@@ -977,6 +977,8 @@ void send_file_name(int f, struct file_l
-
- if (!(file = make_file(fname, flist, ALL_FILTERS)))
+--- orig/flist.c 2005-02-14 02:45:10
++++ flist.c 2005-02-14 02:45:34
+@@ -978,6 +978,8 @@ void send_file_name(int f, struct file_l
+ file = make_file(fname, flist, f == -2 ? SERVER_FILTERS : ALL_FILTERS);
+ if (!file)
return;
+ if (!MAKE_ACL(file, fname))
+ return;
maybe_emit_filelist_progress(flist);
-@@ -985,6 +987,10 @@ void send_file_name(int f, struct file_l
+@@ -986,6 +988,10 @@ void send_file_name(int f, struct file_l
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f, base_flags);
}
if (recursive && S_ISDIR(file->mode)
-@@ -1293,6 +1299,8 @@ struct file_list *recv_file_list(int f)
+@@ -1296,6 +1302,8 @@ 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))
stats.total_size += file->length;
-@@ -1315,6 +1323,8 @@ struct file_list *recv_file_list(int f)
+@@ -1318,6 +1326,8 @@ struct file_list *recv_file_list(int f)
clean_flist(flist, relative_paths, 1);
+ SORT_FILE_ACL_INDEX_LISTS();
+
- if (f != -1) {
+ if (f >= 0) {
/* Now send the uid/gid list. This was introduced in
* protocol version 15 */
---- orig/generator.c 2005-02-13 05:50:28
+--- orig/generator.c 2005-02-14 02:45:10
+++ generator.c 2005-01-30 10:09:44
-@@ -324,6 +324,10 @@ static void recv_generator(char *fname,
+@@ -406,6 +406,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
rprintf(FINFO, "%s/\n", safe_fname(fname));
next;
}
---- orig/options.c 2005-02-13 05:50:28
-+++ options.c 2004-08-19 17:38:57
+--- orig/options.c 2005-02-14 02:45:10
++++ options.c 2005-02-14 02:46:05
@@ -44,6 +44,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
int preserve_uid = 0;
-@@ -166,6 +167,7 @@ static void print_rsync_version(enum log
+@@ -167,6 +168,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;
-@@ -182,6 +184,10 @@ static void print_rsync_version(enum log
+@@ -183,6 +185,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
-+#if SUPPORT_ACLS
++#ifdef SUPPORT_ACLS
+ acls = "";
+#endif
+
- #if SUPPORT_LINKS
+ #ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -196,9 +202,9 @@ static void print_rsync_version(enum log
+@@ -197,9 +203,9 @@ static void print_rsync_version(enum log
"Copyright (C) 1996-2005 by Andrew Tridgell 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
-@@ -268,6 +274,7 @@ void usage(enum logcode F)
+@@ -269,6 +275,7 @@ void usage(enum logcode F)
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -o, --owner preserve owner (root only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
-@@ -387,6 +394,7 @@ static struct poptOption long_options[]
+@@ -389,6 +396,7 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links", 0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
-@@ -831,6 +839,24 @@ int parse_arguments(int *argc, const cha
+@@ -834,6 +842,24 @@ int parse_arguments(int *argc, const cha
basis_dir[basis_dir_cnt++] = (char *)arg;
break;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1203,6 +1229,8 @@ void server_options(char **args,int *arg
+@@ -1206,6 +1232,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_uid)
argstr[x++] = 'o';
if (preserve_gid)
---- orig/rsync.c 2005-02-07 20:41:57
+--- orig/rsync.c 2005-02-14 02:45:10
+++ rsync.c 2004-07-03 20:11:58
@@ -238,6 +238,14 @@ int set_perms(char *fname,struct file_st
}
if (verbose > 1 && flags & PERMS_REPORT) {
if (updated)
rprintf(FINFO, "%s\n", safe_fname(fname));
---- orig/rsync.h 2005-02-12 19:54:27
+--- orig/rsync.h 2005-02-14 02:45:10
+++ rsync.h 2004-07-03 20:11:58
-@@ -610,6 +610,40 @@ struct stats {
+@@ -612,6 +612,40 @@ struct stats {
#include "lib/permstring.h"
#include "lib/addrinfo.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2005-02-13 21:51:10
+--- orig/rsync.yo 2005-02-14 02:45:11
+++ rsync.yo 2004-07-03 20:11:58
@@ -317,6 +317,7 @@ to the detailed description below for a
-H, --hard-links preserve hard links
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-@@ -613,6 +614,11 @@ source file's permissions and the umask
+@@ -614,6 +615,11 @@ source file's permissions and the umask
other files (including updated files) retain their existing permissions
(which is the same behavior as other file-copy utilities, such as cp).
+
+#endif /* No ACLs. */
+#endif /* _SMB_ACLS_H */
---- orig/uidlist.c 2005-01-28 19:08:20
+--- orig/uidlist.c 2005-02-14 02:45:11
+++ uidlist.c 2004-07-03 20:11:58
@@ -34,6 +34,7 @@
extern int verbose;
rprintf(FINFO, "flist->length=%.0f\n",
(double) fptr[i]->length);
rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- orig/flist.c 2005-02-12 19:54:27
+--- orig/flist.c 2005-02-14 02:45:10
+++ flist.c 2005-02-07 21:06:04
@@ -62,6 +62,7 @@ extern int make_backups;
extern int backup_suffix_len;
extern int max_delete;
@@ -147,16 +148,18 @@ static void list_file_entry(struct file_
- #if SUPPORT_LINKS
+ #ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
- rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
+ rprintf(FINFO, "%s %11.0f %s %s %s -> %s\n",
+ atime = file->atime;
+ }
- #if SUPPORT_HARD_LINKS
+ #ifdef SUPPORT_HARD_LINKS
if (file->link_u.idev) {
@@ -439,6 +449,8 @@ void send_file_entry(struct file_struct
write_int(f, modtime);
if (preserve_uid && !(flags & XMIT_SAME_UID)) {
if (!numeric_ids)
add_uid(uid);
-@@ -512,6 +524,7 @@ static void receive_file_entry(struct fi
- unsigned short flags, int f)
+@@ -512,6 +524,7 @@ static struct file_struct *receive_file_
+ unsigned short flags, int f)
{
static time_t modtime;
+ static time_t atime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -530,7 +543,7 @@ static void receive_file_entry(struct fi
+@@ -530,7 +543,7 @@ static struct file_struct *receive_file_
struct file_struct *file;
if (!flist) {
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
-@@ -586,6 +599,8 @@ static void receive_file_entry(struct fi
+@@ -586,6 +599,8 @@ static struct file_struct *receive_file_
modtime = (time_t)read_int(f);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (preserve_uid && !(flags & XMIT_SAME_UID))
uid = (uid_t)read_int(f);
-@@ -636,6 +651,7 @@ static void receive_file_entry(struct fi
+@@ -636,6 +651,7 @@ static struct file_struct *receive_file_
file->flags = 0;
file->modtime = modtime;
file->length = file_length;
file->mode = mode;
file->uid = uid;
-@@ -883,6 +899,7 @@ skip_filters:
+@@ -885,6 +901,7 @@ skip_filters:
file->flags = flags;
file->modtime = st.st_mtime;
file->length = st.st_size;
file->mode = st.st_mode;
file->uid = st.st_uid;
---- orig/generator.c 2005-02-13 05:50:28
+--- orig/generator.c 2005-02-14 02:45:10
+++ generator.c 2004-11-03 23:02:12
-@@ -99,7 +99,7 @@ static int unchanged_file(char *fn, stru
+@@ -100,7 +100,7 @@ static int unchanged_file(char *fn, stru
if (ignore_times)
return 0;
}
-@@ -512,7 +512,7 @@ static void recv_generator(char *fname,
+@@ -612,7 +612,7 @@ static void recv_generator(char *fname,
}
if (update_only && fnamecmp_type == FNAMECMP_FNAME
if (verbose > 1)
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2005-02-13 05:50:28
+--- orig/options.c 2005-02-14 02:45:10
+++ options.c 2005-01-24 01:51:48
@@ -50,6 +50,7 @@ int preserve_uid = 0;
int preserve_gid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -272,6 +273,7 @@ void usage(enum logcode F)
+@@ -273,6 +274,7 @@ void usage(enum logcode F)
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -t, --times preserve times\n");
rprintf(F," -O, --omit-dir-times omit directories when preserving times\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
-@@ -392,6 +394,7 @@ static struct poptOption long_options[]
+@@ -394,6 +396,7 @@ static struct poptOption long_options[]
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_NONE, &omit_dir_times, 0, 0, 0 },
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
-@@ -1211,6 +1214,8 @@ void server_options(char **args,int *arg
+@@ -1214,6 +1217,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (omit_dir_times && am_sender)
argstr[x++] = 'O';
if (preserve_perms)
---- orig/rsync.c 2005-02-07 20:41:57
+--- orig/rsync.c 2005-02-14 02:45:10
+++ rsync.c 2005-01-24 01:59:12
@@ -26,6 +26,7 @@ extern int verbose;
extern int dry_run;
}
change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- orig/rsync.h 2005-02-12 19:54:27
+--- orig/rsync.h 2005-02-14 02:45:10
+++ rsync.h 2004-07-03 20:15:41
@@ -54,6 +54,7 @@
#define XMIT_HAS_IDEV_DATA (1<<9)
/* These flags are used in the live flist data. */
-@@ -114,6 +115,7 @@
+@@ -115,6 +116,7 @@
#define PERMS_REPORT (1<<0)
#define PERMS_SKIP_MTIME (1<<1)
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
-@@ -481,6 +483,7 @@ struct file_struct {
+@@ -483,6 +485,7 @@ struct file_struct {
struct hlink *links;
} link_u;
time_t modtime;
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2005-02-13 05:50:28
+--- orig/rsync.yo 2005-02-14 02:45:11
+++ rsync.yo 2005-01-24 01:57:18
@@ -322,6 +322,7 @@ to the detailed description below for a
-D, --devices preserve devices (root only)
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy files whole
-@@ -642,6 +643,11 @@ dit(bf(-O, --omit-dir-times)) This tells
+@@ -643,6 +644,11 @@ dit(bf(-O, --omit-dir-times)) This tells
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).
return 0;
}
---- orig/util.c 2005-02-11 10:53:15
+--- orig/util.c 2005-02-14 02:45:11
+++ util.c 2005-02-07 21:09:12
@@ -128,12 +128,17 @@ void overflow(char *str)
if (dry_run)
@@ -142,17 +147,17 @@ int set_modtime(char *fname, time_t modt
{
- #if HAVE_UTIMBUF
+ #ifdef HAVE_UTIMBUF
struct utimbuf tbuf;
- tbuf.actime = time(NULL);
+ tbuf.actime = atime;
tbuf.modtime = modtime;
return utime(fname,&tbuf);
- #elif HAVE_UTIME
+ #elif defined HAVE_UTIME
time_t t[2];
- t[0] = time(NULL);
+ t[0] = atime;
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2005-02-12 19:54:27
+--- orig/flist.c 2005-02-14 02:45:10
+++ flist.c 2005-02-12 19:26:37
@@ -67,6 +67,7 @@ extern int sanitize_paths;
extern int max_delete;
flags = base_flags;
-@@ -561,6 +565,9 @@ static void receive_file_entry(struct fi
+@@ -561,6 +565,9 @@ static struct file_struct *receive_file_
strlcpy(lastname, thisname, MAXPATHLEN);
clean_fname(thisname, 0);
if (sanitize_paths)
-@@ -1071,6 +1078,9 @@ struct file_list *send_file_list(int f,
+@@ -1074,6 +1081,9 @@ struct file_list *send_file_list(int f,
start_write = stats.total_written;
gettimeofday(&start_tv, NULL);
flist = flist_new(WITH_HLINK, "send_file_list");
io_start_buffering_out();
-@@ -1249,6 +1259,9 @@ struct file_list *send_file_list(int f,
+@@ -1256,6 +1266,9 @@ struct file_list *send_file_list(int f,
stats.flist_size = stats.total_written - start_write;
stats.num_files = flist->count;
if (verbose > 3)
output_flist(flist, who_am_i());
-@@ -1270,6 +1283,9 @@ struct file_list *recv_file_list(int f)
+@@ -1277,6 +1290,9 @@ struct file_list *recv_file_list(int f)
start_read = stats.total_read;
flist = flist_new(WITH_HLINK, "recv_file_list");
received_flist = flist;
-@@ -1323,6 +1339,9 @@ struct file_list *recv_file_list(int f)
+@@ -1330,6 +1346,9 @@ struct file_list *recv_file_list(int f)
io_error |= read_int(f);
}
+ if (verbose > 2)
+ rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest);
+}
---- orig/generator.c 2005-02-13 05:50:28
+--- orig/generator.c 2005-02-14 02:45:10
+++ generator.c 2005-02-03 02:07:33
-@@ -235,7 +235,13 @@ static void generate_and_send_sums(int f
+@@ -289,7 +289,13 @@ static int find_fuzzy(struct file_struct
* start sending checksums.
*
* Note that f_out is set to -1 when doing final directory-permission and
{ RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
{ RERR_WAITCHILD , "some error returned by waitpid()" },
{ RERR_MALLOC , "error allocating core memory buffers" },
---- orig/main.c 2005-02-07 20:41:56
+--- orig/main.c 2005-02-14 02:45:10
+++ main.c 2004-07-22 00:31:47
-@@ -358,7 +358,7 @@ static pid_t do_cmd(char *cmd, char *mac
+@@ -359,7 +359,7 @@ static pid_t do_cmd(char *cmd, char *mac
whole_file = 1;
ret = local_child(argc, args, f_in, f_out, child_main);
} else
if (dir)
free(dir);
---- orig/options.c 2005-02-13 05:50:28
-+++ options.c 2005-02-13 06:55:04
-@@ -128,6 +128,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
+--- orig/options.c 2005-02-14 02:45:10
++++ options.c 2005-02-14 02:50:32
+@@ -129,6 +129,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
-@@ -305,6 +306,7 @@ void usage(enum logcode F)
+@@ -307,6 +308,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n");
rprintf(F," -f, --filter=RULE add a file-filtering RULE\n");
-@@ -411,6 +413,7 @@ static struct poptOption long_options[]
- {"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
+@@ -414,6 +416,7 @@ static struct poptOption long_options[]
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
+ {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
+ {"fname-convert", 0, POPT_ARG_STRING, &fname_convert_cmd, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
if (pid == -1) {
rsyserr(FERROR, errno, "fork");
exit_cleanup(RERR_IPC);
---- orig/syscall.c 2005-01-28 23:01:10
+--- orig/syscall.c 2005-02-14 02:45:11
+++ syscall.c 2004-07-02 21:39:00
@@ -259,3 +259,34 @@ char *d_name(struct dirent *di)
return di->d_name;
+
+ return result;
+}
---- orig/util.c 2005-02-11 10:53:15
+--- orig/util.c 2005-02-14 02:45:11
+++ util.c 2004-07-03 20:18:02
-@@ -1224,3 +1224,55 @@ void *_realloc_array(void *ptr, unsigned
- return malloc(size * num);
- return realloc(ptr, size * num);
+@@ -1331,3 +1331,55 @@ uint32 fuzzy_distance(const char *s1, in
+
+ return a[len2-1];
}
+
+/**
+}
+
+#endif
---- orig/options.c 2005-02-13 05:50:28
-+++ options.c 2005-02-13 06:59:14
-@@ -131,6 +131,7 @@ char *log_format = NULL;
+--- orig/options.c 2005-02-14 02:45:10
++++ options.c 2005-02-14 02:52:09
+@@ -132,6 +132,7 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = 0;
int compare_dest = 0;
-@@ -305,6 +306,7 @@ void usage(enum logcode F)
+@@ -307,6 +308,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n");
rprintf(F," -f, --filter=RULE add a file-filtering RULE\n");
-@@ -343,7 +345,7 @@ void usage(enum logcode F)
+@@ -345,7 +347,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -411,6 +413,7 @@ static struct poptOption long_options[]
+@@ -413,6 +415,7 @@ static struct poptOption long_options[]
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
+ {"link-by-hash", 0, POPT_ARG_STRING, 0, OPT_LINK_BY_HASH, 0, 0},
+ {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
- {"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 },
-@@ -831,6 +834,21 @@ int parse_arguments(int *argc, const cha
+@@ -834,6 +837,21 @@ int parse_arguments(int *argc, const cha
basis_dir[basis_dir_cnt++] = (char *)arg;
break;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1366,6 +1384,11 @@ void server_options(char **args,int *arg
+@@ -1369,6 +1387,11 @@ void server_options(char **args,int *arg
}
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
if (remote_filesfrom_file) {
args[ac++] = "--files-from";
---- orig/receiver.c 2005-02-11 10:53:14
+--- orig/receiver.c 2005-02-14 02:45:10
+++ receiver.c 2005-01-15 21:29:13
@@ -35,6 +35,7 @@ extern int preserve_hard_links;
extern int preserve_perms;
if (mapbuf)
unmap_file(mapbuf);
-@@ -259,7 +270,7 @@ static int receive_data(int f_in, char *
+@@ -289,7 +300,7 @@ static void read_gen_name(int fd, char *
static void discard_receive_data(int f_in, OFF_T length)
{
}
-@@ -501,8 +512,12 @@ int recv_files(int f_in, struct file_lis
+@@ -535,8 +546,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
log_recv(file, &initial_stats);
---- orig/rsync.c 2005-02-07 20:41:57
+--- orig/rsync.c 2005-02-14 02:45:10
+++ rsync.c 2005-02-07 21:11:30
@@ -36,6 +36,7 @@ extern int force_delete;
extern int recurse;
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
---- orig/rsync.h 2005-02-12 19:54:27
+--- orig/rsync.h 2005-02-14 02:45:10
+++ rsync.h 2004-07-03 20:20:15
-@@ -603,6 +603,14 @@ struct stats {
+@@ -605,6 +605,14 @@ struct stats {
int current_file_index;
};
#include "byteorder.h"
#include "lib/mdfour.h"
---- orig/rsync.yo 2005-02-13 05:50:28
+--- orig/rsync.yo 2005-02-14 02:45:11
+++ rsync.yo 2005-02-13 06:58:47
-@@ -354,6 +354,7 @@ to the detailed description below for a
+@@ -355,6 +355,7 @@ to the detailed description below for a
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
handle relative symlinks properly, and that has not yet been fixed
in this modified version.
---- orig/flist.c 2005-02-03 02:04:20
+--- orig/flist.c 2005-02-14 02:45:10
+++ flist.c 2004-07-16 16:58:04
-@@ -52,6 +52,7 @@ extern int filesfrom_fd;
+@@ -51,6 +51,7 @@ extern int filesfrom_fd;
extern int one_file_system;
extern int keep_dirlinks;
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_devices;
-@@ -738,6 +739,30 @@ static void receive_file_entry(struct fi
+@@ -737,6 +738,30 @@ static struct file_struct *receive_file_
}
@@ -862,7 +887,13 @@ skip_filters:
basename_len = strlen(basename) + 1; /* count the '\0' */
- #if SUPPORT_LINKS
+ #ifdef SUPPORT_LINKS
- linkname_len = S_ISLNK(st.st_mode) ? strlen(linkname) + 1 : 0;
+ if (S_ISLNK(st.st_mode)) {
+ if (follow_links_depth && links_depth(linkname, &st))
#else
linkname_len = 0;
#endif
---- orig/options.c 2005-02-01 10:39:22
+--- orig/options.c 2005-02-14 02:45:10
+++ options.c 2005-01-28 19:33:24
@@ -43,6 +43,7 @@ int archive_mode = 0;
int keep_dirlinks = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
-@@ -260,6 +261,7 @@ void usage(enum logcode F)
+@@ -263,6 +264,7 @@ void usage(enum logcode F)
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," -d, --dirs transfer directories without recursing\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
rprintf(F," -L, --copy-links transform symlink into referent file/dir\n");
rprintf(F," --copy-unsafe-links only \"unsafe\" symlinks are transformed\n");
rprintf(F," --safe-links ignore symlinks that point outside the source tree\n");
-@@ -378,6 +380,7 @@ static struct poptOption long_options[]
+@@ -383,6 +385,7 @@ static struct poptOption long_options[]
{"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
{"dirs", 'd', POPT_ARG_VAL, &xfer_dirs, 2, 0, 0 },
{"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 },
{"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 },
{"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 },
{"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 },
---- orig/rsync.yo 2005-02-01 10:39:23
+--- orig/rsync.yo 2005-02-14 02:45:11
+++ rsync.yo 2005-01-28 19:33:40
@@ -311,6 +311,7 @@ to the detailed description below for a
--inplace update destination files in-place
rsync -avoogg host:/from/ /to/
---- orig/compat.c 2005-02-01 10:39:22
-+++ compat.c 2004-09-09 01:59:08
-@@ -28,8 +28,11 @@
+--- orig/compat.c 2005-02-14 02:47:53
++++ compat.c 2005-02-14 02:53:52
+@@ -28,11 +28,14 @@
int remote_protocol = 0;
extern int verbose;
+extern int am_root;
extern int am_server;
extern int am_sender;
-+extern int preserve_uid;
-+extern int preserve_gid;
+ extern int fuzzy_basis;
extern int read_batch;
extern int checksum_seed;
++extern int preserve_uid;
++extern int preserve_gid;
extern int protocol_version;
-@@ -81,4 +84,11 @@ void setup_protocol(int f_out,int f_in)
+
+ void setup_protocol(int f_out,int f_in)
+@@ -89,4 +92,11 @@ void setup_protocol(int f_out,int f_in)
} else {
checksum_seed = read_int(f_in);
}
+ preserve_gid = 2;
+ }
}
---- orig/options.c 2005-02-01 10:39:22
+--- orig/options.c 2005-02-14 02:45:10
+++ options.c 2004-09-09 01:59:08
-@@ -384,8 +384,8 @@ static struct poptOption long_options[]
+@@ -389,8 +389,8 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links", 0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_NONE, &omit_dir_times, 0, 0, 0 },
-@@ -690,6 +690,14 @@ int parse_arguments(int *argc, const cha
+@@ -719,6 +719,14 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
case 'v':
verbose++;
break;
-@@ -901,8 +909,8 @@ int parse_arguments(int *argc, const cha
+@@ -929,8 +937,8 @@ int parse_arguments(int *argc, const cha
#endif
preserve_perms = 1;
preserve_times = 1;
preserve_devices = 1;
}
-@@ -1144,10 +1152,16 @@ void server_options(char **args,int *arg
+@@ -1206,10 +1214,16 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_devices)
argstr[x++] = 'D';
if (preserve_times)
---- orig/rsync.c 2005-02-01 10:39:22
+--- orig/rsync.c 2005-02-14 02:45:10
+++ rsync.c 2005-02-01 10:46:04
@@ -26,7 +26,6 @@ extern int verbose;
extern int dry_run;
extern int am_server;
extern int am_sender;
extern int am_generator;
-@@ -181,7 +180,7 @@ int set_perms(char *fname,struct file_st
+@@ -182,7 +181,7 @@ int set_perms(char *fname,struct file_st
updated = 1;
}
+ change_uid = preserve_uid > 1 && st->st_uid != file->uid;
change_gid = preserve_gid && file->gid != GID_NONE
&& st->st_gid != file->gid;
- #if !HAVE_LCHOWN && !CHOWN_MODIFIES_SYMLINK
---- orig/uidlist.c 2005-01-28 19:08:20
+ #if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK
+--- orig/uidlist.c 2005-02-14 02:45:11
+++ uidlist.c 2004-09-09 01:59:08
@@ -35,7 +35,6 @@ extern int verbose;
extern int preserve_uid;
This is an adapted version of the original by Zoong Pham.
---- orig/lib/getaddrinfo.c 2004-03-16 01:26:36
+--- orig/lib/getaddrinfo.c 2005-02-14 02:45:11
+++ lib/getaddrinfo.c 2004-06-18 17:38:35
@@ -41,6 +41,20 @@
#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif
---- orig/syscall.c 2005-01-28 23:01:10
-+++ syscall.c 2004-10-06 00:17:22
+--- orig/syscall.c 2005-02-14 02:45:11
++++ syscall.c 2005-02-14 02:54:45
@@ -27,6 +27,7 @@
#include "rsync.h"
- #if !MKNOD_CREATES_SOCKETS && HAVE_SYS_UN_H
+ #if !defined MKNOD_CREATES_SOCKETS && defined HAVE_SYS_UN_H
+#define _SOCKADDR_LEN
#include <sys/un.h>
#endif