From 125d7fcab02513e84b140ea5b1cc6f86ec1ff023 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 6 Jun 2004 21:30:35 +0000 Subject: [PATCH] Fixed fuzz and failed hunks. --- acls.diff | 110 ++++++++++++++++++++--------------------- atimes.diff | 78 ++++++++++++++--------------- filter.diff | 2 +- fsync.diff | 22 ++++----- inplace.diff | 46 ++++++++--------- link-by-hash.diff | 30 +++++------ openssl-support.diff | 54 ++++++++++---------- remove-sent-files.diff | 44 ++++++++--------- time-limit.diff | 39 +++++++-------- 9 files changed, 212 insertions(+), 213 deletions(-) diff --git a/acls.diff b/acls.diff index 8f135a8..8b1a978 100644 --- a/acls.diff +++ b/acls.diff @@ -7,8 +7,8 @@ After applying this patch, run these commands for a successful build: make ---- Makefile.in 2 May 2004 17:04:14 -0000 1.100 -+++ Makefile.in 13 May 2004 17:58:41 -0000 +--- Makefile.in 15 May 2004 00:48:11 -0000 1.101 ++++ Makefile.in 6 Jun 2004 21:11:46 -0000 @@ -25,7 +25,7 @@ VERSION=@VERSION@ .SUFFIXES: .SUFFIXES: .c .o @@ -28,7 +28,7 @@ After applying this patch, run these commands for a successful build: DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ acls.c 13 May 2004 17:58:42 -0000 ++++ acls.c 6 Jun 2004 21:11:46 -0000 @@ -0,0 +1,1119 @@ +/* -*- c-file-style: "linux" -*- + Copyright (C) Andrew Tridgell 1996 @@ -1149,9 +1149,9 @@ After applying this patch, run these commands for a successful build: + + +#endif /* SUPPORT_ACLS */ ---- backup.c 13 May 2004 06:34:03 -0000 1.30 -+++ backup.c 13 May 2004 17:58:42 -0000 -@@ -104,6 +104,7 @@ static int make_bak_dir(char *fullpath) +--- backup.c 15 May 2004 19:31:10 -0000 1.31 ++++ backup.c 6 Jun 2004 21:11:46 -0000 +@@ -105,6 +105,7 @@ static int make_bak_dir(char *fullpath) } else { do_lchown(fullpath, st.st_uid, st.st_gid); do_chmod(fullpath, st.st_mode); @@ -1177,7 +1177,7 @@ After applying this patch, run these commands for a successful build: if (verbose > 1) --- configure.in 30 Apr 2004 18:03:33 -0000 1.196 -+++ configure.in 13 May 2004 17:58:44 -0000 ++++ configure.in 6 Jun 2004 21:11:46 -0000 @@ -434,6 +434,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no AC_CHECK_LIB(resolv, strcasecmp) fi @@ -1190,11 +1190,10 @@ After applying this patch, run these commands for a successful build: dnl At the moment we don't test for a broken memcmp(), because all we dnl need to do is test for equality, not comparison, and it seems that dnl every platform has a memcmp that can do at least that. -@@ -654,6 +659,74 @@ AC_SUBST(OBJ_SAVE) - AC_SUBST(OBJ_RESTORE) +@@ -655,6 +660,74 @@ AC_SUBST(OBJ_RESTORE) AC_SUBST(CC_SHOBJ_FLAG) AC_SUBST(BUILD_POPT) -+ + +AC_CHECK_HEADERS(sys/acl.h) +AC_CHECK_FUNCS(_acl __acl _facl __facl) +################################################# @@ -1262,12 +1261,13 @@ After applying this patch, run these commands for a successful build: + AC_DEFINE(HAVE_NO_ACLS, 1, [true if you don't have ACLs]) + AC_MSG_RESULT(no) +) - ++ AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT ---- flist.c 11 May 2004 17:25:16 -0000 1.221 -+++ flist.c 13 May 2004 17:58:44 -0000 -@@ -931,6 +931,8 @@ void send_file_name(int f, struct file_l + +--- flist.c 29 May 2004 21:21:17 -0000 1.226 ++++ flist.c 6 Jun 2004 21:11:47 -0000 +@@ -927,6 +927,8 @@ void send_file_name(int f, struct file_l if (!file) return; @@ -1276,7 +1276,7 @@ After applying this patch, run these commands for a successful build: maybe_emit_filelist_progress(flist); -@@ -942,6 +944,10 @@ void send_file_name(int f, struct file_l +@@ -938,6 +940,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); @@ -1287,7 +1287,7 @@ After applying this patch, run these commands for a successful build: } if (recursive && S_ISDIR(file->mode) -@@ -1257,6 +1263,8 @@ struct file_list *recv_file_list(int f) +@@ -1255,6 +1261,8 @@ struct file_list *recv_file_list(int f) flags |= read_byte(f) << 8; receive_file_entry(&flist->files[i], flags, flist, f); @@ -1296,20 +1296,20 @@ After applying this patch, run these commands for a successful build: if (S_ISREG(flist->files[i]->mode)) stats.total_size += flist->files[i]->length; -@@ -1278,6 +1286,8 @@ struct file_list *recv_file_list(int f) - finish_filelist_progress(flist); +@@ -1277,6 +1285,8 @@ struct file_list *recv_file_list(int f) clean_flist(flist, relative_paths, 1); -+ -+ SORT_FILE_ACL_INDEX_LISTS(); ++ SORT_FILE_ACL_INDEX_LISTS(); ++ if (f != -1) { /* Now send the uid/gid list. This was introduced in ---- generator.c 13 May 2004 06:55:01 -0000 1.82 -+++ generator.c 13 May 2004 17:58:45 -0000 -@@ -328,6 +328,10 @@ void recv_generator(char *fname, struct - permission and modification time repair */ - if (set_perms(fname,file,NULL,0) && verbose && (f_out != -1)) + * protocol version 15 */ +--- generator.c 5 Jun 2004 16:16:30 -0000 1.86 ++++ generator.c 6 Jun 2004 21:11:47 -0000 +@@ -353,6 +353,10 @@ void recv_generator(char *fname, struct + if (set_perms(fname, file, statret ? NULL : &st, 0) + && verbose && f_out != -1) rprintf(FINFO,"%s/\n",fname); +#if SUPPORT_ACLS + if (f_out == -1) @@ -1319,7 +1319,7 @@ After applying this patch, run these commands for a successful build: } --- mkproto.awk 1 Jan 2004 21:10:50 -0000 1.6 -+++ mkproto.awk 13 May 2004 17:58:45 -0000 ++++ mkproto.awk 6 Jun 2004 21:11:47 -0000 @@ -58,7 +58,7 @@ BEGIN { next; } @@ -1329,9 +1329,9 @@ After applying this patch, run these commands for a successful build: next; } ---- options.c 6 May 2004 21:08:01 -0000 1.148 -+++ options.c 13 May 2004 17:58:45 -0000 -@@ -41,6 +41,7 @@ int archive_mode = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:11:47 -0000 +@@ -43,6 +43,7 @@ int keep_dirlinks = 0; int copy_links = 0; int preserve_links = 0; int preserve_hard_links = 0; @@ -1339,7 +1339,7 @@ After applying this patch, run these commands for a successful build: int preserve_perms = 0; int preserve_devices = 0; int preserve_uid = 0; -@@ -147,6 +148,7 @@ static void print_rsync_version(enum log +@@ -150,6 +151,7 @@ static void print_rsync_version(enum log { char const *got_socketpair = "no "; char const *hardlinks = "no "; @@ -1347,7 +1347,7 @@ After applying this patch, run these commands for a successful build: char const *links = "no "; char const *ipv6 = "no "; STRUCT_STAT *dumstat; -@@ -159,6 +161,10 @@ static void print_rsync_version(enum log +@@ -162,6 +164,10 @@ static void print_rsync_version(enum log hardlinks = ""; #endif @@ -1358,7 +1358,7 @@ After applying this patch, run these commands for a successful build: #if SUPPORT_LINKS links = ""; #endif -@@ -173,9 +179,9 @@ static void print_rsync_version(enum log +@@ -176,9 +182,9 @@ static void print_rsync_version(enum log "Copyright (C) 1996-2004 by Andrew Tridgell and others\n"); rprintf(f, "\n"); rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, " @@ -1370,7 +1370,7 @@ After applying this patch, run these commands for a successful build: /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature -@@ -237,6 +243,7 @@ void usage(enum logcode F) +@@ -241,6 +247,7 @@ void usage(enum logcode F) rprintf(F," --safe-links ignore \"unsafe\" symlinks\n"); rprintf(F," -H, --hard-links preserve hard links\n"); rprintf(F," -p, --perms preserve permissions\n"); @@ -1378,7 +1378,7 @@ After applying this patch, run these commands for a successful build: 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"); -@@ -380,6 +387,7 @@ static struct poptOption long_options[] +@@ -386,6 +393,7 @@ static struct poptOption long_options[] {"address", 0, POPT_ARG_STRING, &bind_address, 0, 0, 0 }, {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 }, @@ -1386,7 +1386,7 @@ After applying this patch, run these commands for a successful build: {"read-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_READ_BATCH, 0, 0 }, {"write-batch", 0, POPT_ARG_STRING, &batch_prefix, OPT_WRITE_BATCH, 0, 0 }, {"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 }, -@@ -584,6 +592,31 @@ int parse_arguments(int *argc, const cha +@@ -601,6 +609,31 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -1418,7 +1418,7 @@ After applying this patch, run these commands for a successful build: default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -815,6 +848,8 @@ void server_options(char **args,int *arg +@@ -838,6 +871,8 @@ void server_options(char **args,int *arg if (preserve_hard_links) argstr[x++] = 'H'; @@ -1427,8 +1427,8 @@ After applying this patch, run these commands for a successful build: if (preserve_uid) argstr[x++] = 'o'; if (preserve_gid) ---- rsync.c 13 May 2004 07:08:25 -0000 1.136 -+++ rsync.c 13 May 2004 17:58:45 -0000 +--- rsync.c 21 May 2004 08:43:03 -0000 1.140 ++++ rsync.c 6 Jun 2004 21:11:47 -0000 @@ -204,6 +204,14 @@ int set_perms(char *fname,struct file_st } #endif @@ -1444,9 +1444,9 @@ After applying this patch, run these commands for a successful build: if (verbose > 1 && flags & PERMS_REPORT) { if (updated) rprintf(FINFO,"%s\n",fname); ---- rsync.h 13 May 2004 06:53:23 -0000 1.202 -+++ rsync.h 13 May 2004 17:58:45 -0000 -@@ -537,6 +537,40 @@ static inline int flist_up(struct file_l +--- rsync.h 16 May 2004 07:28:24 -0000 1.204 ++++ rsync.h 6 Jun 2004 21:11:47 -0000 +@@ -538,6 +538,40 @@ static inline int flist_up(struct file_l #include "lib/permstring.h" #include "lib/addrinfo.h" @@ -1487,9 +1487,9 @@ After applying this patch, run these commands for a successful build: #include "proto.h" /* We have replacement versions of these if they're missing. */ ---- rsync.yo 7 May 2004 00:18:37 -0000 1.169 -+++ rsync.yo 13 May 2004 17:58:46 -0000 -@@ -295,6 +295,7 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 6 Jun 2004 21:11:48 -0000 +@@ -296,6 +296,7 @@ verb( --safe-links ignore "unsafe" symlinks -H, --hard-links preserve hard links -p, --perms preserve permissions @@ -1497,20 +1497,20 @@ After applying this patch, run these commands for a successful build: -o, --owner preserve owner (root only) -g, --group preserve group -D, --devices preserve devices (root only) -@@ -520,6 +521,11 @@ Without this option, each new file gets - source file's permissions and the umask at the receiving end, while all +@@ -527,6 +528,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). -+ + +dit(bf(-A, --acls)) This option causes rsync to update the remote +ACLs to be the same as the local ACLs. This will work only if the +remote machine's rsync supports this option also. This is a non-standard +option. - ++ dit(bf(-o, --owner)) This option causes rsync to set the owner of the destination file to be the same as the source file. On most systems, + only the super-user can set file ownership. By default, the preservation --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ smb_acls.h 13 May 2004 17:58:46 -0000 ++++ smb_acls.h 6 Jun 2004 21:11:48 -0000 @@ -0,0 +1,277 @@ +/* + Unix SMB/Netbios implementation. @@ -1790,7 +1790,7 @@ After applying this patch, run these commands for a successful build: +#endif /* No ACLs. */ +#endif /* _SMB_ACLS_H */ --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ sysacls.c 13 May 2004 17:58:47 -0000 ++++ sysacls.c 6 Jun 2004 21:11:49 -0000 @@ -0,0 +1,3117 @@ +/* + Unix SMB/Netbios implementation. @@ -4910,7 +4910,7 @@ After applying this patch, run these commands for a successful build: + +#endif /* No ACLs. */ --- uidlist.c 28 Apr 2004 17:31:31 -0000 1.24 -+++ uidlist.c 13 May 2004 17:58:47 -0000 ++++ uidlist.c 6 Jun 2004 21:11:49 -0000 @@ -34,6 +34,7 @@ extern int verbose; extern int preserve_uid; @@ -4955,11 +4955,10 @@ After applying this patch, run these commands for a successful build: /* read the gid list */ while ((id = read_int(f)) != 0) { int len = read_byte(f); -@@ -336,6 +337,18 @@ void recv_uid_list(int f, struct file_li - recv_add_gid(id, name); /* node keeps name's memory */ +@@ -337,6 +338,18 @@ void recv_uid_list(int f, struct file_li } } -+ + +#if SUPPORT_ACLS + if (preserve_acls && !numeric_ids) { + id_t id; @@ -4971,6 +4970,7 @@ After applying this patch, run these commands for a successful build: + acl_gid_map(match_gid(id)); + } +#endif /* SUPPORT_ACLS */ - ++ /* now convert the uid/gid of all files in the list to the mapped * uid/gid */ + if (am_root && preserve_uid && !numeric_ids) { diff --git a/atimes.diff b/atimes.diff index a453786..1dd2804 100644 --- a/atimes.diff +++ b/atimes.diff @@ -5,7 +5,7 @@ command before "make": --- batch.c 15 May 2004 19:31:10 -0000 1.32 -+++ batch.c 21 May 2004 08:47:28 -0000 ++++ batch.c 6 Jun 2004 21:18:17 -0000 @@ -335,6 +335,8 @@ void show_flist(int index, struct file_s rprintf(FINFO, "flist->flags=%#x\n", fptr[i]->flags); rprintf(FINFO, "flist->modtime=%#lx\n", @@ -15,8 +15,8 @@ command before "make": rprintf(FINFO, "flist->length=%.0f\n", (double) fptr[i]->length); rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode); ---- flist.c 16 May 2004 23:54:12 -0000 1.224 -+++ flist.c 21 May 2004 08:47:28 -0000 +--- flist.c 29 May 2004 21:21:17 -0000 1.226 ++++ flist.c 6 Jun 2004 21:18:17 -0000 @@ -57,6 +57,7 @@ extern int relative_paths; extern int implied_dirs; extern int copy_links; @@ -46,7 +46,7 @@ command before "make": } -@@ -325,6 +326,7 @@ void send_file_entry(struct file_struct +@@ -321,6 +322,7 @@ void send_file_entry(struct file_struct { unsigned short flags; static time_t modtime; @@ -54,7 +54,7 @@ command before "make": static mode_t mode; static uint64 dev; static dev_t rdev; -@@ -340,7 +342,7 @@ void send_file_entry(struct file_struct +@@ -336,7 +338,7 @@ void send_file_entry(struct file_struct if (!file) { write_byte(f, 0); @@ -63,7 +63,7 @@ command before "make": dev = 0, rdev = makedev(0, 0); rdev_major = 0; uid = 0, gid = 0; -@@ -389,6 +391,12 @@ void send_file_entry(struct file_struct +@@ -385,6 +387,12 @@ void send_file_entry(struct file_struct flags |= XMIT_SAME_TIME; else modtime = file->modtime; @@ -76,7 +76,7 @@ command before "make": #if SUPPORT_HARD_LINKS if (file->link_u.idev) { -@@ -444,6 +452,8 @@ void send_file_entry(struct file_struct +@@ -440,6 +448,8 @@ void send_file_entry(struct file_struct write_int(f, modtime); if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); @@ -85,7 +85,7 @@ command before "make": if (preserve_uid && !(flags & XMIT_SAME_UID)) { if (!numeric_ids) add_uid(uid); -@@ -517,6 +527,7 @@ void receive_file_entry(struct file_stru +@@ -513,6 +523,7 @@ void receive_file_entry(struct file_stru struct file_list *flist, int f) { static time_t modtime; @@ -93,7 +93,7 @@ command before "make": static mode_t mode; static uint64 dev; static dev_t rdev; -@@ -533,7 +544,7 @@ void receive_file_entry(struct file_stru +@@ -529,7 +540,7 @@ void receive_file_entry(struct file_stru struct file_struct *file; if (!fptr) { @@ -102,7 +102,7 @@ command before "make": dev = 0, rdev = makedev(0, 0); rdev_major = 0; uid = 0, gid = 0; -@@ -588,6 +599,8 @@ void receive_file_entry(struct file_stru +@@ -584,6 +595,8 @@ void receive_file_entry(struct file_stru modtime = (time_t)read_int(f); if (!(flags & XMIT_SAME_MODE)) mode = from_wire_mode(read_int(f)); @@ -111,7 +111,7 @@ command before "make": if (preserve_uid && !(flags & XMIT_SAME_UID)) uid = (uid_t)read_int(f); -@@ -638,6 +651,7 @@ void receive_file_entry(struct file_stru +@@ -634,6 +647,7 @@ void receive_file_entry(struct file_stru file->flags = flags & XMIT_TOP_DIR ? FLAG_TOP_DIR : 0; file->modtime = modtime; @@ -119,7 +119,7 @@ command before "make": file->length = file_length; file->mode = mode; file->uid = uid; -@@ -852,6 +866,7 @@ skip_excludes: +@@ -848,6 +862,7 @@ skip_excludes: file->flags = flags; file->modtime = st.st_mtime; @@ -127,9 +127,9 @@ command before "make": file->length = st.st_size; file->mode = st.st_mode; file->uid = st.st_uid; ---- generator.c 18 May 2004 08:50:17 -0000 1.85 -+++ generator.c 21 May 2004 08:47:28 -0000 -@@ -100,7 +100,7 @@ static int skip_file(char *fname, struct +--- generator.c 5 Jun 2004 16:16:30 -0000 1.86 ++++ generator.c 6 Jun 2004 21:18:17 -0000 +@@ -101,7 +101,7 @@ static int skip_file(char *fname, struct return 0; } @@ -138,7 +138,7 @@ command before "make": } -@@ -480,7 +480,7 @@ void recv_generator(char *fname, struct +@@ -491,7 +491,7 @@ void recv_generator(char *fname, struct return; } @@ -147,9 +147,9 @@ command before "make": if (verbose > 1) rprintf(FINFO,"%s is newer\n",fname); return; ---- options.c 6 May 2004 21:08:01 -0000 1.148 -+++ options.c 21 May 2004 08:47:28 -0000 -@@ -46,6 +46,7 @@ int preserve_devices = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:18:18 -0000 +@@ -48,6 +48,7 @@ int preserve_devices = 0; int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; @@ -157,7 +157,7 @@ command before "make": int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -241,6 +242,7 @@ void usage(enum logcode F) +@@ -245,6 +246,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"); @@ -165,7 +165,7 @@ command before "make": rprintf(F," -S, --sparse handle sparse files efficiently\n"); rprintf(F," -n, --dry-run show what would have been transferred\n"); rprintf(F," -W, --whole-file copy whole files, no incremental checks\n"); -@@ -346,6 +348,7 @@ static struct poptOption long_options[] +@@ -352,6 +354,7 @@ static struct poptOption long_options[] {"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 }, {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, {"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 }, @@ -173,7 +173,7 @@ command before "make": {"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 }, -@@ -823,6 +826,8 @@ void server_options(char **args,int *arg +@@ -846,6 +849,8 @@ void server_options(char **args,int *arg argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; @@ -183,7 +183,7 @@ command before "make": argstr[x++] = 'p'; if (recurse) --- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 21 May 2004 08:47:29 -0000 ++++ rsync.c 6 Jun 2004 21:18:18 -0000 @@ -25,6 +25,7 @@ extern int verbose; extern int dry_run; @@ -229,7 +229,7 @@ command before "make": change_uid = am_root && preserve_uid && st->st_uid != file->uid; --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 21 May 2004 08:47:29 -0000 ++++ rsync.h 6 Jun 2004 21:18:18 -0000 @@ -54,6 +54,7 @@ #define XMIT_HAS_IDEV_DATA (1<<9) #define XMIT_SAME_DEV (1<<10) @@ -254,9 +254,9 @@ command before "make": uid_t uid; gid_t gid; mode_t mode; ---- rsync.yo 7 May 2004 00:18:37 -0000 1.169 -+++ rsync.yo 21 May 2004 08:47:29 -0000 -@@ -299,6 +299,7 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 6 Jun 2004 21:18:19 -0000 +@@ -300,6 +300,7 @@ verb( -g, --group preserve group -D, --devices preserve devices (root only) -t, --times preserve times @@ -264,7 +264,7 @@ command before "make": -S, --sparse handle sparse files efficiently -n, --dry-run show what would have been transferred -W, --whole-file copy whole files, no incremental checks -@@ -546,6 +547,11 @@ cause the next transfer to behave as if +@@ -552,6 +553,11 @@ cause the next transfer to behave as if their checksums compared and show up in log messages even if they haven't changed. @@ -277,7 +277,7 @@ command before "make": instead it will just report the actions it would have taken. --- tls.c 15 May 2004 19:09:42 -0000 1.20 -+++ tls.c 21 May 2004 08:47:30 -0000 ++++ tls.c 6 Jun 2004 21:18:19 -0000 @@ -39,6 +39,7 @@ @@ -413,8 +413,8 @@ command before "make": return 0; } ---- util.c 21 May 2004 08:40:25 -0000 1.144 -+++ util.c 21 May 2004 08:47:30 -0000 +--- util.c 5 Jun 2004 20:26:56 -0000 1.148 ++++ util.c 6 Jun 2004 21:18:19 -0000 @@ -127,31 +127,39 @@ void overflow(char *str) @@ -430,15 +430,15 @@ command before "make": + char mtimebuf[200]; + char atimebuf[200]; + -+ strlcpy(mtimebuf, timestring(modtime), sizeof(mtimebuf)); -+ strlcpy(atimebuf, timestring(atime), sizeof(atimebuf)); ++ strlcpy(mtimebuf, timestring(modtime), sizeof mtimebuf); ++ strlcpy(atimebuf, timestring(atime), sizeof atimebuf); + + rprintf(FINFO, + "set modtime, atime of %s to (%ld) %s, (%ld) %s\n", - fname, (long) modtime, + fname, (long)modtime, - asctime(localtime(&modtime))); + mtimebuf, -+ (long) atime, atimebuf); ++ (long)atime, atimebuf); } { @@ -461,7 +461,7 @@ command before "make": t[0].tv_usec = 0; t[1].tv_sec = modtime; t[1].tv_usec = 0; -@@ -1058,8 +1066,8 @@ int msleep(int t) +@@ -1065,8 +1073,8 @@ int msleep(int t) /** @@ -472,7 +472,7 @@ command before "make": * --modify-window). * * @retval 0 if the times should be treated as the same -@@ -1068,7 +1076,7 @@ int msleep(int t) +@@ -1075,7 +1083,7 @@ int msleep(int t) * * @retval -1 if the 2nd is later **/ @@ -482,7 +482,7 @@ command before "make": if (file2 > file1) { if (file2 - file1 <= modify_window) --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ testsuite/copy-atimes.test 21 May 2004 08:47:30 -0000 ++++ testsuite/copy-atimes.test 6 Jun 2004 21:18:19 -0000 @@ -0,0 +1,19 @@ +#! /bin/sh + @@ -504,7 +504,7 @@ command before "make": +# The script would have aborted on error, so getting here means we've won. +exit 0 --- testsuite/rsync.fns 18 May 2004 00:41:55 -0000 1.60 -+++ testsuite/rsync.fns 21 May 2004 08:47:30 -0000 ++++ testsuite/rsync.fns 6 Jun 2004 21:18:19 -0000 @@ -50,7 +50,7 @@ printmsg() { diff --git a/filter.diff b/filter.diff index aa39841..52fc1ca 100644 --- a/filter.diff +++ b/filter.diff @@ -581,7 +581,7 @@ contained a slash. OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST, - OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, + OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_INHERIT, OPT_MODIFY_WINDOW, - OPT_READ_BATCH, OPT_WRITE_BATCH, + OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_REFUSED_BASE = 9000}; @@ -331,6 +332,7 @@ static struct poptOption long_options[] diff --git a/fsync.diff b/fsync.diff index 78262f2..fab45ed 100644 --- a/fsync.diff +++ b/fsync.diff @@ -1,25 +1,25 @@ This patch from Sami Farin lets you specify --fsync if you want fsync() to be called on every file we write. ---- options.c 6 May 2004 21:08:01 -0000 1.148 -+++ options.c 21 May 2004 08:59:11 -0000 -@@ -37,6 +37,7 @@ int make_backups = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:20:05 -0000 +@@ -38,6 +38,7 @@ int make_backups = 0; **/ int whole_file = -1; +int do_fsync = 0; int archive_mode = 0; + int keep_dirlinks = 0; int copy_links = 0; - int preserve_links = 0; -@@ -230,6 +231,7 @@ void usage(enum logcode F) +@@ -233,6 +234,7 @@ void usage(enum logcode F) rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n"); rprintf(F," --backup-dir make backups into this directory\n"); rprintf(F," --suffix=SUFFIX backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); + rprintf(F," --fsync fsync every written file\n"); rprintf(F," -u, --update update only (don't overwrite newer files)\n"); + rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n"); rprintf(F," -l, --links copy symlinks as symlinks\n"); - rprintf(F," -L, --copy-links copy the referent of all symlinks\n"); -@@ -332,6 +334,7 @@ static struct poptOption long_options[] +@@ -337,6 +339,7 @@ static struct poptOption long_options[] {"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 }, {"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 }, {"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 }, @@ -27,7 +27,7 @@ to be called on every file we write. {"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 }, {"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 }, {"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 }, -@@ -944,6 +947,9 @@ void server_options(char **args,int *arg +@@ -973,6 +976,9 @@ void server_options(char **args,int *arg args[ac++] = tmpdir; } @@ -38,7 +38,7 @@ to be called on every file we write. /* the server only needs this option if it is not the sender, * and it may be an older version that doesn't know this --- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 21 May 2004 08:59:11 -0000 ++++ receiver.c 6 Jun 2004 21:20:05 -0000 @@ -47,6 +47,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; @@ -60,8 +60,8 @@ to be called on every file we write. sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); ---- util.c 21 May 2004 08:40:25 -0000 1.144 -+++ util.c 21 May 2004 08:59:11 -0000 +--- util.c 5 Jun 2004 20:26:56 -0000 1.148 ++++ util.c 6 Jun 2004 21:20:06 -0000 @@ -32,6 +32,7 @@ extern int dry_run; extern int module_id; extern int modify_window; diff --git a/inplace.diff b/inplace.diff index cb75fe2..0a262bb 100644 --- a/inplace.diff +++ b/inplace.diff @@ -1,7 +1,7 @@ Patch from Mark Curtis to implement the --inplace option. --- match.c 21 May 2004 08:27:04 -0000 1.62 -+++ match.c 4 Jun 2004 05:27:20 -0000 ++++ match.c 6 Jun 2004 21:23:27 -0000 @@ -23,6 +23,7 @@ extern int verbose; extern int am_server; extern int do_progress; @@ -21,9 +21,9 @@ Patch from Mark Curtis to implement the --inplace option. if (verbose > 3) rprintf(FINFO,"potential match at %.0f target=%.0f %.0f sum=%08x\n", (double)offset,(double)j,(double)i,sum); ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 4 Jun 2004 05:27:21 -0000 -@@ -92,6 +92,7 @@ int ignore_errors = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:23:27 -0000 +@@ -94,6 +94,7 @@ int ignore_errors = 0; int modify_window = 0; int blocking_io = -1; int checksum_seed = 0; @@ -31,23 +31,23 @@ Patch from Mark Curtis to implement the --inplace option. unsigned int block_size = 0; -@@ -232,6 +233,7 @@ void usage(enum logcode F) +@@ -234,6 +235,7 @@ void usage(enum logcode F) rprintf(F," --backup-dir make backups into this directory\n"); rprintf(F," --suffix=SUFFIX backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); rprintf(F," -u, --update update only (don't overwrite newer files)\n"); + rprintf(F," --inplace update the destination file inplace *SEE MAN PAGE*\n"); + rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n"); rprintf(F," -l, --links copy symlinks as symlinks\n"); rprintf(F," -L, --copy-links copy the referent of all symlinks\n"); - rprintf(F," --copy-unsafe-links copy the referent of \"unsafe\" symlinks\n"); -@@ -323,6 +325,7 @@ static struct poptOption long_options[] - {"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 }, - {"existing", 0, POPT_ARG_NONE, &only_existing, 0, 0, 0 }, - {"ignore-existing", 0, POPT_ARG_NONE, &opt_ignore_existing, 0, 0, 0 }, +@@ -341,6 +343,7 @@ static struct poptOption long_options[] + {"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 }, + {"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 }, + {"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 }, + {"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 }, - {"delete-after", 0, POPT_ARG_NONE, 0, OPT_DELETE_AFTER, 0, 0 }, - {"delete-excluded", 0, POPT_ARG_NONE, 0, OPT_DELETE_EXCLUDED, 0, 0 }, - {"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 }, -@@ -735,6 +738,9 @@ int parse_arguments(int *argc, const cha + {"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 }, + {"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 }, + {"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 }, +@@ -744,6 +747,9 @@ int parse_arguments(int *argc, const cha bwlimit_writemax = 512; } @@ -57,7 +57,7 @@ Patch from Mark Curtis to implement the --inplace option. if (files_from) { char *colon; if (*argc != 2 && !(am_server && am_sender && *argc == 1)) { -@@ -957,6 +963,9 @@ void server_options(char **args,int *arg +@@ -968,6 +974,9 @@ void server_options(char **args,int *arg if (opt_ignore_existing && am_sender) args[ac++] = "--ignore-existing"; @@ -68,7 +68,7 @@ Patch from Mark Curtis to implement the --inplace option. args[ac++] = "--temp-dir"; args[ac++] = tmpdir; --- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 4 Jun 2004 05:27:21 -0000 ++++ receiver.c 6 Jun 2004 21:23:27 -0000 @@ -47,6 +47,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; @@ -190,7 +190,7 @@ Patch from Mark Curtis to implement the --inplace option. cleanup_set(fnametmp, fname, file, mapbuf, fd1, fd2); --- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 4 Jun 2004 05:27:21 -0000 ++++ rsync.c 6 Jun 2004 21:23:27 -0000 @@ -34,6 +34,7 @@ extern int force_delete; extern int recurse; extern int make_backups; @@ -211,19 +211,19 @@ Patch from Mark Curtis to implement the --inplace option. /* move tmp file over real file */ ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS); if (ret < 0) { ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 4 Jun 2004 05:27:22 -0000 +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 6 Jun 2004 21:23:28 -0000 @@ -289,6 +289,7 @@ verb( --backup-dir make backups into this directory --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) -u, --update update only (don't overwrite newer files) + --inplace update the destination file inplace + -K, --keep-dirlinks treat symlinked dir on receiver as dir -l, --links copy symlinks as symlinks -L, --copy-links copy the referent of all symlinks - --copy-unsafe-links copy the referent of "unsafe" symlinks -@@ -479,6 +480,17 @@ symlink where the destination has a file - regardless of the timestamps. This might change in the future (feel - free to comment on this on the mailing list if you have an opinion). +@@ -484,6 +485,17 @@ dit(bf(-K, --keep-dirlinks)) On the rece + pointing to a directory, it will be treated as matching a directory + from the sender. +dit(bf(--inplace)) This causes rsync not to create a new copy of the file +and then move it into place. Instead rsync will overwrite the existing diff --git a/link-by-hash.diff b/link-by-hash.diff index 19bf5c7..b319873 100644 --- a/link-by-hash.diff +++ b/link-by-hash.diff @@ -12,7 +12,7 @@ the file's name. --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 21 May 2004 09:07:58 -0000 ++++ Makefile.in 6 Jun 2004 21:24:41 -0000 @@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle main.o checksum.o match.o syscall.o log.o backup.o OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \ @@ -23,7 +23,7 @@ the file's name. popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ hashlink.c 21 May 2004 09:07:59 -0000 ++++ hashlink.c 6 Jun 2004 21:24:41 -0000 @@ -0,0 +1,342 @@ +/* + Copyright (C) Cronosys, LLC 2004 @@ -367,9 +367,9 @@ the file's name. +} + +#endif ---- options.c 6 May 2004 21:08:01 -0000 1.148 -+++ options.c 21 May 2004 09:07:59 -0000 -@@ -121,6 +121,7 @@ char *log_format = NULL; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:24:41 -0000 +@@ -124,6 +124,7 @@ char *log_format = NULL; char *password_file = NULL; char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; @@ -377,7 +377,7 @@ the file's name. char backup_dir_buf[MAXPATHLEN]; int rsync_port = RSYNC_PORT; int link_dest = 0; -@@ -266,6 +267,7 @@ void usage(enum logcode F) +@@ -270,6 +271,7 @@ void usage(enum logcode F) rprintf(F," -T --temp-dir=DIR create temporary files in directory DIR\n"); rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n"); rprintf(F," --link-dest=DIR create hardlinks to DIR for unchanged files\n"); @@ -385,16 +385,16 @@ the file's name. rprintf(F," -P equivalent to --partial --progress\n"); rprintf(F," -z, --compress compress file data\n"); rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n"); -@@ -305,7 +307,7 @@ void usage(enum logcode F) +@@ -310,7 +312,7 @@ void usage(enum logcode F) enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, -- OPT_READ_BATCH, OPT_WRITE_BATCH, -+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_LINK_BY_HASH, +- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, ++ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_LINK_BY_HASH, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -362,6 +364,7 @@ static struct poptOption long_options[] +@@ -368,6 +370,7 @@ static struct poptOption long_options[] {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, {"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 }, {"link-dest", 0, POPT_ARG_STRING, &compare_dest, OPT_LINK_DEST, 0, 0 }, @@ -402,7 +402,7 @@ the file's name. /* TODO: Should this take an optional int giving the compression level? */ {"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 }, {"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 }, -@@ -584,6 +587,19 @@ int parse_arguments(int *argc, const cha +@@ -601,6 +604,19 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -422,7 +422,7 @@ the file's name. default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -953,6 +969,11 @@ void server_options(char **args,int *arg +@@ -982,6 +998,11 @@ void server_options(char **args,int *arg args[ac++] = compare_dest; } @@ -435,7 +435,7 @@ the file's name. if (remote_filesfrom_file) { args[ac++] = "--files-from"; --- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 21 May 2004 09:07:59 -0000 ++++ receiver.c 6 Jun 2004 21:24:41 -0000 @@ -47,6 +47,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; @@ -535,7 +535,7 @@ the file's name. log_recv(file, &initial_stats); --- rsync.c 21 May 2004 08:43:03 -0000 1.140 -+++ rsync.c 21 May 2004 09:07:59 -0000 ++++ rsync.c 6 Jun 2004 21:24:41 -0000 @@ -34,6 +34,7 @@ extern int force_delete; extern int recurse; extern int make_backups; @@ -560,7 +560,7 @@ the file's name. rsyserr(FERROR, errno, "%s %s -> \"%s\"", ret == -2 ? "copy" : "rename", --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 21 May 2004 09:07:59 -0000 ++++ rsync.h 6 Jun 2004 21:24:41 -0000 @@ -522,6 +522,14 @@ struct stats { int current_file_index; }; diff --git a/openssl-support.diff b/openssl-support.diff index 0f4597e..fb2b69e 100644 --- a/openssl-support.diff +++ b/openssl-support.diff @@ -38,7 +38,7 @@ can't say if I've left any cleanup/compatibility errors in the code. --- Makefile.in 15 May 2004 00:48:11 -0000 1.101 -+++ Makefile.in 4 Jun 2004 05:28:32 -0000 ++++ Makefile.in 6 Jun 2004 21:26:59 -0000 @@ -39,7 +39,7 @@ OBJS3=progress.o pipe.o DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ @@ -49,7 +49,7 @@ can't say if I've left any cleanup/compatibility errors in the code. TLS_OBJ = tls.o syscall.o lib/permstring.o --- cleanup.c 13 May 2004 07:08:18 -0000 1.22 -+++ cleanup.c 4 Jun 2004 05:28:32 -0000 ++++ cleanup.c 6 Jun 2004 21:26:59 -0000 @@ -24,6 +24,9 @@ extern int io_error; extern int keep_partial; @@ -72,8 +72,8 @@ can't say if I've left any cleanup/compatibility errors in the code. if (verbose > 3) { rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n", code, file, line); ---- clientserver.c 15 May 2004 19:31:10 -0000 1.122 -+++ clientserver.c 4 Jun 2004 05:28:32 -0000 +--- clientserver.c 5 Jun 2004 19:59:03 -0000 1.123 ++++ clientserver.c 6 Jun 2004 21:26:59 -0000 @@ -46,6 +46,9 @@ extern int io_timeout; extern int orig_umask; extern int no_detach; @@ -104,7 +104,7 @@ can't say if I've left any cleanup/compatibility errors in the code. } int start_inband_exchange(char *user, char *path, int f_in, int f_out, int argc) -@@ -145,6 +158,33 @@ int start_inband_exchange(char *user, ch +@@ -147,6 +160,33 @@ int start_inband_exchange(char *user, ch if (protocol_version > remote_protocol) protocol_version = remote_protocol; @@ -138,7 +138,7 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(path,'/'); if (p) *p = 0; io_printf(f_out, "%s\n", path); -@@ -172,6 +212,10 @@ int start_inband_exchange(char *user, ch +@@ -175,6 +215,10 @@ int start_inband_exchange(char *user, ch * server to terminate the listing of modules. * We don't want to go on and transfer * anything; just exit. */ @@ -149,7 +149,7 @@ can't say if I've left any cleanup/compatibility errors in the code. exit(0); } -@@ -179,6 +223,10 @@ int start_inband_exchange(char *user, ch +@@ -182,6 +226,10 @@ int start_inband_exchange(char *user, ch rprintf(FERROR,"%s\n", line); /* This is always fatal; the server will now * close the socket. */ @@ -160,7 +160,7 @@ can't say if I've left any cleanup/compatibility errors in the code. return RERR_STARTCLIENT; } else { rprintf(FINFO,"%s\n", line); -@@ -485,6 +533,7 @@ static void send_listing(int fd) +@@ -481,6 +529,7 @@ static void send_listing(int fd) io_printf(fd,"@RSYNCD: EXIT\n"); } @@ -168,7 +168,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* this is called when a connection is established to a client and we want to start talking. The setup of the system is done from here */ -@@ -544,6 +593,20 @@ int start_daemon(int f_in, int f_out) +@@ -538,6 +587,20 @@ int start_daemon(int f_in, int f_out) return -1; } @@ -190,7 +190,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* it's some sort of command that I don't understand */ io_printf(f_out, "@ERROR: Unknown command '%s'\n", line); --- config.h.in 29 Apr 2004 19:40:39 -0000 1.90 -+++ config.h.in 4 Jun 2004 05:28:32 -0000 ++++ config.h.in 6 Jun 2004 21:26:59 -0000 @@ -167,6 +167,9 @@ /* */ #undef HAVE_OFF64_T @@ -202,7 +202,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #undef HAVE_READLINK --- configure.in 30 Apr 2004 18:03:33 -0000 1.196 -+++ configure.in 4 Jun 2004 05:28:32 -0000 ++++ configure.in 6 Jun 2004 21:26:59 -0000 @@ -271,6 +271,21 @@ yes AC_SEARCH_LIBS(getaddrinfo, inet6) fi @@ -226,7 +226,7 @@ can't say if I've left any cleanup/compatibility errors in the code. case $host_os in *cygwin* ) AC_MSG_RESULT(yes) --- main.c 19 May 2004 22:19:19 -0000 1.195 -+++ main.c 4 Jun 2004 05:28:33 -0000 ++++ main.c 6 Jun 2004 21:27:00 -0000 @@ -51,6 +51,9 @@ extern int rsync_port; extern int read_batch; extern int write_batch; @@ -302,9 +302,9 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(host,'/'); if (p) { *p = 0; ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 4 Jun 2004 05:28:33 -0000 -@@ -131,6 +131,14 @@ int quiet = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:27:00 -0000 +@@ -133,6 +133,14 @@ int quiet = 0; int always_checksum = 0; int list_only = 0; @@ -319,7 +319,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #define FIXED_CHECKSUM_SEED 32761 #define MAX_BATCH_PREFIX_LEN 256 /* Must be less than MAXPATHLEN-13 */ char *batch_prefix = NULL; -@@ -143,13 +151,13 @@ static int modify_window_set; +@@ -145,13 +153,13 @@ static int modify_window_set; * address, or a hostname. **/ char *bind_address; @@ -334,7 +334,7 @@ can't say if I've left any cleanup/compatibility errors in the code. STRUCT_STAT *dumstat; #ifdef HAVE_SOCKETPAIR -@@ -168,6 +176,10 @@ static void print_rsync_version(enum log +@@ -170,6 +178,10 @@ static void print_rsync_version(enum log ipv6 = ""; #endif @@ -345,7 +345,7 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(f, "%s version %s protocol version %d\n", RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); rprintf(f, -@@ -181,10 +193,10 @@ static void print_rsync_version(enum log +@@ -183,10 +195,10 @@ static void print_rsync_version(enum log /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature * macros. */ @@ -358,7 +358,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #ifdef MAINTAINER_MODE rprintf(f, " panic action: \"%s\"\n", get_panic_action()); -@@ -296,6 +308,13 @@ void usage(enum logcode F) +@@ -299,6 +311,13 @@ void usage(enum logcode F) rprintf(F," -4 --ipv4 prefer IPv4\n"); rprintf(F," -6 --ipv6 prefer IPv6\n"); #endif @@ -372,16 +372,16 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(F," -h, --help show this help screen\n"); rprintf(F,"\n"); -@@ -307,7 +326,7 @@ void usage(enum logcode F) +@@ -310,7 +329,7 @@ void usage(enum logcode F) enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, -- OPT_READ_BATCH, OPT_WRITE_BATCH, -+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_USE_SSL, +- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, ++ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_USE_SSL, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -393,6 +412,13 @@ static struct poptOption long_options[] +@@ -397,6 +416,13 @@ static struct poptOption long_options[] {"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 }, {"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 }, #endif @@ -395,7 +395,7 @@ can't say if I've left any cleanup/compatibility errors in the code. {0,0,0,0, 0, 0, 0} }; -@@ -592,6 +618,12 @@ int parse_arguments(int *argc, const cha +@@ -601,6 +627,12 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -408,7 +408,7 @@ can't say if I've left any cleanup/compatibility errors in the code. default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -729,6 +761,17 @@ int parse_arguments(int *argc, const cha +@@ -738,6 +770,17 @@ int parse_arguments(int *argc, const cha if (do_progress && !verbose) verbose = 1; @@ -427,7 +427,7 @@ can't say if I've left any cleanup/compatibility errors in the code. bwlimit_writemax = (size_t)bwlimit * 128; if (bwlimit_writemax < 512) --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 4 Jun 2004 05:28:33 -0000 ++++ rsync.h 6 Jun 2004 21:27:00 -0000 @@ -32,6 +32,7 @@ #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock" @@ -449,7 +449,7 @@ can't say if I've left any cleanup/compatibility errors in the code. * ino_t and dev_t internally, even if this platform does not * allow files to have 64-bit inums. That's because the --- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ ssl.c 4 Jun 2004 05:28:33 -0000 ++++ ssl.c 6 Jun 2004 21:27:00 -0000 @@ -0,0 +1,366 @@ +/* -*- c-file-style: "linux" -*- + * ssl.c: operations for negotiating SSL rsync connections. diff --git a/remove-sent-files.diff b/remove-sent-files.diff index 65e6a7b..ded4209 100644 --- a/remove-sent-files.diff +++ b/remove-sent-files.diff @@ -4,9 +4,9 @@ command before "make": make proto ---- io.c 27 May 2004 22:09:31 -0000 1.122 -+++ io.c 4 Jun 2004 05:21:59 -0000 -@@ -223,6 +223,14 @@ static void read_msg_fd(void) +--- io.c 6 Jun 2004 19:15:58 -0000 1.125 ++++ io.c 6 Jun 2004 21:19:26 -0000 +@@ -225,6 +225,14 @@ static void read_msg_fd(void) read_loop(fd, buf, 4); redo_list_add(IVAL(buf,0)); break; @@ -21,7 +21,7 @@ command before "make": case MSG_INFO: case MSG_ERROR: case MSG_LOG: -@@ -637,6 +645,16 @@ static int read_unbuffered(int fd, char +@@ -639,6 +647,16 @@ static int read_unbuffered(int fd, char read_loop(fd, buffer, remaining); bufferIdx = 0; break; @@ -39,7 +39,7 @@ command before "make": case MSG_ERROR: if (remaining >= sizeof line) { --- main.c 19 May 2004 22:19:19 -0000 1.195 -+++ main.c 4 Jun 2004 05:22:00 -0000 ++++ main.c 6 Jun 2004 21:19:27 -0000 @@ -42,6 +42,7 @@ extern int list_only; extern int local_server; extern int log_got_error; @@ -67,9 +67,9 @@ command before "make": if (argc == 0) list_only = 1; ---- options.c 27 May 2004 21:51:53 -0000 1.153 -+++ options.c 4 Jun 2004 05:22:00 -0000 -@@ -85,6 +85,7 @@ int size_only = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:19:27 -0000 +@@ -87,6 +87,7 @@ int size_only = 0; int bwlimit = 0; size_t bwlimit_writemax = 0; int delete_after = 0; @@ -77,7 +77,7 @@ command before "make": int only_existing = 0; int opt_ignore_existing = 0; int max_delete = 0; -@@ -92,6 +93,7 @@ int ignore_errors = 0; +@@ -94,6 +95,7 @@ int ignore_errors = 0; int modify_window = 0; int blocking_io = -1; int checksum_seed = 0; @@ -85,7 +85,7 @@ command before "make": unsigned int block_size = 0; -@@ -255,6 +257,7 @@ void usage(enum logcode F) +@@ -258,6 +260,7 @@ void usage(enum logcode F) rprintf(F," --delete delete files that don't exist on the sending side\n"); rprintf(F," --delete-excluded also delete excluded files on the receiving side\n"); rprintf(F," --delete-after receiver deletes after transferring, not before\n"); @@ -93,7 +93,7 @@ command before "make": rprintf(F," --ignore-errors delete even if there are I/O errors\n"); rprintf(F," --max-delete=NUM don't delete more than NUM files\n"); rprintf(F," --partial keep partially transferred files\n"); -@@ -305,8 +308,8 @@ void usage(enum logcode F) +@@ -308,8 +311,8 @@ void usage(enum logcode F) } enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, @@ -101,10 +101,10 @@ command before "make": - OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, + OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_DELETE_SENT_FILES, + OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_LINK_DEST, OPT_MODIFY_WINDOW, - OPT_READ_BATCH, OPT_WRITE_BATCH, + OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_REFUSED_BASE = 9000}; -@@ -325,6 +328,7 @@ static struct poptOption long_options[] +@@ -328,6 +331,7 @@ static struct poptOption long_options[] {"ignore-existing", 0, POPT_ARG_NONE, &opt_ignore_existing, 0, 0, 0 }, {"delete-after", 0, POPT_ARG_NONE, 0, OPT_DELETE_AFTER, 0, 0 }, {"delete-excluded", 0, POPT_ARG_NONE, 0, OPT_DELETE_EXCLUDED, 0, 0 }, @@ -112,7 +112,7 @@ command before "make": {"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 }, {"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 }, {"exclude", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE, 0, 0 }, -@@ -514,6 +518,11 @@ int parse_arguments(int *argc, const cha +@@ -518,6 +522,11 @@ int parse_arguments(int *argc, const cha delete_mode = 1; break; @@ -124,7 +124,7 @@ command before "make": case OPT_EXCLUDE: if (am_server || sanitize_paths) return 0; /* Impossible... */ -@@ -983,6 +992,9 @@ void server_options(char **args,int *arg +@@ -994,6 +1003,9 @@ void server_options(char **args,int *arg } } @@ -135,7 +135,7 @@ command before "make": return; --- receiver.c 21 May 2004 08:27:04 -0000 1.79 -+++ receiver.c 4 Jun 2004 05:22:00 -0000 ++++ receiver.c 6 Jun 2004 21:19:28 -0000 @@ -47,6 +47,7 @@ extern int ignore_errors; extern int orig_umask; extern int keep_partial; @@ -179,7 +179,7 @@ command before "make": } } --- rsync.h 16 May 2004 07:28:24 -0000 1.204 -+++ rsync.h 4 Jun 2004 05:22:00 -0000 ++++ rsync.h 6 Jun 2004 21:19:28 -0000 @@ -60,6 +60,7 @@ #define FLAG_TOP_DIR (1<<0) #define FLAG_HLINK_EOL (1<<1) /* generator only */ @@ -196,9 +196,9 @@ command before "make": MSG_DONE=5, /* current phase is done */ MSG_REDO=4, /* reprocess indicated flist index */ MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */ ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 4 Jun 2004 05:22:01 -0000 -@@ -312,6 +312,7 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 6 Jun 2004 21:19:29 -0000 +@@ -313,6 +313,7 @@ verb( --delete delete files that don't exist on sender --delete-excluded also delete excluded files on receiver --delete-after receiver deletes after transfer, not before @@ -206,7 +206,7 @@ command before "make": --ignore-errors delete even if there are I/O errors --max-delete=NUM don't delete more than NUM files --partial keep partially transferred files -@@ -598,6 +599,11 @@ receiving side before transferring files +@@ -603,6 +604,11 @@ receiving side before transferring files sufficient space on the receiving filesystem. If you want to delete after transferring, use the --delete-after switch. Implies --delete. @@ -219,7 +219,7 @@ command before "make": even when there are I/O errors. --- sender.c 15 May 2004 19:31:10 -0000 1.40 -+++ sender.c 4 Jun 2004 05:22:01 -0000 ++++ sender.c 6 Jun 2004 21:19:29 -0000 @@ -27,6 +27,7 @@ extern int dry_run; extern int am_server; extern int am_daemon; diff --git a/time-limit.diff b/time-limit.diff index f71e9f2..c065bc3 100644 --- a/time-limit.diff +++ b/time-limit.diff @@ -3,8 +3,8 @@ to be simpler and more efficient by Wayne Davison. Do we need configure support for mktime()? ---- io.c 15 May 2004 19:31:10 -0000 1.121 -+++ io.c 22 May 2004 19:33:07 -0000 +--- io.c 6 Jun 2004 19:15:58 -0000 1.125 ++++ io.c 6 Jun 2004 21:28:20 -0000 @@ -44,6 +44,7 @@ static int io_multiplexing_in; static int multiplex_in_fd = -1; static int multiplex_out_fd = -1; @@ -13,7 +13,7 @@ Do we need configure support for mktime()? static int no_flush; extern int bwlimit; -@@ -125,16 +126,21 @@ static void check_timeout(void) +@@ -128,16 +129,21 @@ static void check_timeout(void) { time_t t; @@ -39,9 +39,9 @@ Do we need configure support for mktime()? if (last_io && io_timeout && (t-last_io) >= io_timeout) { if (!am_server && !am_daemon) { rprintf(FERROR, "io timeout after %d seconds - exiting\n", ---- options.c 22 May 2004 06:09:22 -0000 1.151 -+++ options.c 22 May 2004 19:33:07 -0000 -@@ -92,6 +92,7 @@ int modify_window = 0; +--- options.c 6 Jun 2004 19:02:40 -0000 1.155 ++++ options.c 6 Jun 2004 21:28:21 -0000 +@@ -95,6 +95,7 @@ int modify_window = 0; int blocking_io = -1; int checksum_seed = 0; unsigned int block_size = 0; @@ -49,7 +49,7 @@ Do we need configure support for mktime()? /** Network address family. **/ -@@ -288,6 +289,8 @@ void usage(enum logcode F) +@@ -292,6 +293,8 @@ void usage(enum logcode F) rprintf(F," --log-format=FORMAT log file transfers using specified format\n"); rprintf(F," --password-file=FILE get password from FILE\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth, KBytes per second\n"); @@ -58,16 +58,15 @@ Do we need configure support for mktime()? rprintf(F," --write-batch=PREFIX write batch fileset starting with PREFIX\n"); rprintf(F," --read-batch=PREFIX read batch fileset starting with PREFIX\n"); rprintf(F," --checksum-seed=NUM set block/file checksum seed\n"); -@@ -306,7 +309,7 @@ void usage(enum logcode F) - enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, +@@ -311,6 +314,7 @@ enum {OPT_VERSION = 1000, OPT_SENDER, OP OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, -- OPT_READ_BATCH, OPT_WRITE_BATCH, -+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_STOP_AT, OPT_TIME_LIMIT, + OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, ++ OPT_STOP_AT, OPT_TIME_LIMIT, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -378,6 +381,8 @@ static struct poptOption long_options[] +@@ -383,6 +387,8 @@ static struct poptOption long_options[] {"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 }, {"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 }, {"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 }, @@ -76,7 +75,7 @@ Do we need configure support for mktime()? {"address", 0, POPT_ARG_STRING, &bind_address, 0, 0, 0 }, {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, {"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 }, -@@ -587,6 +592,36 @@ int parse_arguments(int *argc, const cha +@@ -601,6 +607,36 @@ int parse_arguments(int *argc, const cha return 0; #endif @@ -113,7 +112,7 @@ Do we need configure support for mktime()? default: /* A large opt value means that set_refuse_options() * turned this option off (opt-BASE is its index). */ -@@ -886,6 +921,15 @@ void server_options(char **args,int *arg +@@ -908,6 +944,15 @@ void server_options(char **args,int *arg args[ac++] = arg; } @@ -129,9 +128,9 @@ Do we need configure support for mktime()? if (backup_dir) { args[ac++] = "--backup-dir"; args[ac++] = backup_dir; ---- rsync.yo 21 May 2004 09:44:32 -0000 1.170 -+++ rsync.yo 22 May 2004 19:33:08 -0000 -@@ -346,6 +346,8 @@ verb( +--- rsync.yo 5 Jun 2004 16:16:30 -0000 1.171 ++++ rsync.yo 6 Jun 2004 21:28:21 -0000 +@@ -347,6 +347,8 @@ verb( --log-format=FORMAT log file transfers using specified format --password-file=FILE get password from FILE --bwlimit=KBPS limit I/O bandwidth, KBytes per second @@ -140,7 +139,7 @@ Do we need configure support for mktime()? --write-batch=PREFIX write batch fileset starting with PREFIX --read-batch=PREFIX read batch fileset starting with PREFIX --checksum-seed=NUM set block/file checksum seed -@@ -892,6 +894,19 @@ transfer was too fast, it will wait befo +@@ -897,6 +899,19 @@ transfer was too fast, it will wait befo result is an average transfer rate equaling the specified limit. A value of zero specifies no limit. @@ -160,8 +159,8 @@ Do we need configure support for mktime()? dit(bf(--write-batch=PREFIX)) Generate a set of files that can be transferred as a batch update. Each filename in the set starts with PREFIX. See the "BATCH MODE" section for details. ---- util.c 21 May 2004 08:40:25 -0000 1.144 -+++ util.c 22 May 2004 19:33:08 -0000 +--- util.c 5 Jun 2004 20:26:56 -0000 1.148 ++++ util.c 6 Jun 2004 21:28:22 -0000 @@ -125,6 +125,132 @@ void overflow(char *str) exit_cleanup(RERR_MALLOC); } -- 2.34.1