+
+
+#endif /* SUPPORT_ACLS */
---- orig/backup.c 2004-06-11 07:47:42
+--- orig/backup.c 2004-07-26 06:19:04
+++ backup.c 2004-07-03 20:11:58
@@ -105,6 +105,7 @@ static int make_bak_dir(char *fullpath)
} else {
}
}
*p = '/';
-@@ -167,6 +168,8 @@ static int keep_backup(char *fname)
+@@ -168,6 +169,8 @@ static int keep_backup(char *fname)
return 0;
}
#ifdef HAVE_MKNOD
/* Check to see if this is a device file, or link */
if (IS_DEVICE(file->mode)) {
-@@ -237,6 +240,7 @@ static int keep_backup(char *fname)
+@@ -242,6 +245,7 @@ static int keep_backup(char *fname)
}
}
set_perms(backup_dir_buf, file, NULL, 0);
AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig])
AC_OUTPUT
---- orig/flist.c 2004-07-15 02:21:10
+--- orig/flist.c 2004-07-17 15:20:05
+++ flist.c 2004-07-03 20:11:58
@@ -942,6 +942,8 @@ void send_file_name(int f, struct file_l
if (f != -1) {
/* Now send the uid/gid list. This was introduced in
* protocol version 15 */
---- orig/generator.c 2004-07-16 19:35:29
+--- orig/generator.c 2004-07-28 10:05:29
+++ generator.c 2004-07-03 20:11:58
-@@ -327,6 +327,10 @@ static void recv_generator(char *fname,
+@@ -335,6 +335,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
- rprintf(FINFO,"%s/\n",fname);
+ rprintf(FINFO, "%s/\n", safe_fname(fname));
+#if SUPPORT_ACLS
+ if (f_out == -1)
+ SET_ACL(fname, file);
next;
}
---- orig/options.c 2004-07-16 20:07:22
+--- orig/options.c 2004-07-23 17:16:13
+++ options.c 2004-07-15 16:53:42
@@ -43,6 +43,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -247,6 +253,7 @@ void usage(enum logcode F)
+@@ -248,6 +254,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");
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");
-@@ -355,6 +362,7 @@ static struct poptOption long_options[]
+@@ -356,6 +363,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 },
-@@ -601,6 +609,31 @@ int parse_arguments(int *argc, const cha
+@@ -602,6 +610,31 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -867,6 +900,8 @@ void server_options(char **args,int *arg
+@@ -873,6 +906,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 2004-07-16 20:07:23
+--- orig/rsync.c 2004-07-26 16:06:53
+++ rsync.c 2004-07-03 20:11:58
@@ -205,6 +205,14 @@ int set_perms(char *fname,struct file_st
}
if (verbose > 1 && flags & PERMS_REPORT) {
if (updated)
rprintf(FINFO,"%s\n",fname);
---- orig/rsync.h 2004-07-16 20:07:23
+--- orig/rsync.h 2004-07-23 17:16:13
+++ rsync.h 2004-07-03 20:11:58
-@@ -540,6 +540,40 @@ static inline int flist_up(struct file_l
+@@ -538,6 +538,40 @@ static inline int flist_up(struct file_l
#include "lib/permstring.h"
#include "lib/addrinfo.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2004-07-16 20:07:23
+--- orig/rsync.yo 2004-07-24 16:52:10
+++ rsync.yo 2004-07-03 20:11:58
@@ -297,6 +297,7 @@ verb(
--safe-links ignore "unsafe" symlinks
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-@@ -539,6 +540,11 @@ source file's permissions and the umask
+@@ -542,6 +543,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).
make proto
---- orig/batch.c 2004-07-15 16:51:50
+--- orig/batch.c 2004-07-24 16:52:09
+++ batch.c 2004-07-03 20:15:41
-@@ -63,6 +63,8 @@ void show_flist(int index, struct file_s
+@@ -186,6 +186,8 @@ void show_flist(int index, struct file_s
rprintf(FINFO, "flist->flags=%#x\n", fptr[i]->flags);
rprintf(FINFO, "flist->modtime=%#lx\n",
(long unsigned) fptr[i]->modtime);
rprintf(FINFO, "flist->length=%.0f\n",
(double) fptr[i]->length);
rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- orig/flist.c 2004-07-15 02:21:10
+--- orig/flist.c 2004-07-17 15:20:05
+++ flist.c 2004-07-03 20:15:41
@@ -58,6 +58,7 @@ extern int relative_paths;
extern int implied_dirs;
file->length = st.st_size;
file->mode = st.st_mode;
file->uid = st.st_uid;
---- orig/generator.c 2004-07-16 19:35:29
+--- orig/generator.c 2004-07-28 10:05:29
+++ generator.c 2004-07-03 20:15:41
-@@ -99,7 +99,7 @@ static int skip_file(char *fname, struct
+@@ -98,7 +98,7 @@ static int skip_file(char *fname, struct
if (ignore_times)
return 0;
}
-@@ -471,7 +471,7 @@ static void recv_generator(char *fname,
+@@ -473,7 +473,7 @@ static void recv_generator(char *fname,
}
if (update_only && fnamecmp == fname
- && cmp_modtime(st.st_mtime, file->modtime) > 0) {
+ && cmp_time(st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
- rprintf(FINFO,"%s is newer\n",fname);
+ rprintf(FINFO, "%s is newer\n", safe_fname(fname));
return;
---- orig/options.c 2004-07-16 20:07:22
+--- orig/options.c 2004-07-23 17:16:13
+++ options.c 2004-07-03 20:15:41
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -251,6 +252,7 @@ void usage(enum logcode F)
+@@ -252,6 +253,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," -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");
-@@ -359,6 +361,7 @@ static struct poptOption long_options[]
+@@ -360,6 +362,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 },
{"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 },
-@@ -875,6 +878,8 @@ void server_options(char **args,int *arg
+@@ -881,6 +884,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (preserve_perms)
argstr[x++] = 'p';
if (recurse)
---- orig/rsync.c 2004-07-16 20:07:23
+--- orig/rsync.c 2004-07-26 16:06:53
+++ rsync.c 2004-07-03 20:15:41
@@ -25,6 +25,7 @@
extern int verbose;
}
change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- orig/rsync.h 2004-07-16 20:07:23
+--- orig/rsync.h 2004-07-23 17:16:13
+++ rsync.h 2004-07-03 20:15:41
@@ -54,6 +54,7 @@
#define XMIT_HAS_IDEV_DATA (1<<9)
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2004-07-16 20:07:23
+--- orig/rsync.yo 2004-07-24 16:52:10
+++ rsync.yo 2004-07-03 20:15:41
@@ -301,6 +301,7 @@ verb(
-g, --group preserve group
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy whole files, no incremental checks
-@@ -564,6 +565,11 @@ cause the next transfer to behave as if
+@@ -567,6 +568,11 @@ cause the next transfer to behave as if
their checksums compared and show up in log messages even if they haven't
changed.
+
+# The script would have aborted on error, so getting here means we've won.
+exit 0
---- orig/testsuite/rsync.fns 2004-06-28 21:08:14
+--- orig/testsuite/rsync.fns 2004-07-23 17:16:13
+++ testsuite/rsync.fns 2004-07-03 20:15:41
@@ -50,7 +50,7 @@ printmsg() {
return 0;
}
---- orig/util.c 2004-06-09 21:54:47
+--- orig/util.c 2004-07-26 16:33:24
+++ util.c 2004-07-03 20:15:41
@@ -127,31 +127,39 @@ void overflow(char *str)
t[0].tv_usec = 0;
t[1].tv_sec = modtime;
t[1].tv_usec = 0;
-@@ -1078,8 +1086,8 @@ int msleep(int t)
+@@ -1103,8 +1111,8 @@ int msleep(int t)
/**
* --modify-window).
*
* @retval 0 if the times should be treated as the same
-@@ -1088,7 +1096,7 @@ int msleep(int t)
+@@ -1113,7 +1121,7 @@ int msleep(int t)
*
* @retval -1 if the 2nd is later
**/
+}
+
+#endif
---- orig/options.c 2004-07-20 21:36:07
+--- orig/options.c 2004-07-23 17:16:13
+++ options.c 2004-07-03 20:20:15
@@ -125,6 +125,7 @@ char *log_format = NULL;
char *password_file = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
-@@ -276,6 +277,7 @@ void usage(enum logcode F)
+@@ -277,6 +278,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");
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");
-@@ -316,7 +318,7 @@ void usage(enum logcode F)
+@@ -317,7 +319,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_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -375,6 +377,7 @@ static struct poptOption long_options[]
+@@ -376,6 +378,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 },
/* 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 },
-@@ -601,6 +604,19 @@ int parse_arguments(int *argc, const cha
+@@ -602,6 +605,19 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -1007,6 +1023,11 @@ void server_options(char **args,int *arg
+@@ -1013,6 +1029,11 @@ void server_options(char **args,int *arg
args[ac++] = compare_dest;
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
if (remote_filesfrom_file) {
args[ac++] = "--files-from";
---- orig/receiver.c 2004-07-20 21:36:07
+--- orig/receiver.c 2004-07-26 16:20:00
+++ receiver.c 2004-07-20 21:44:05
-@@ -37,6 +37,7 @@ extern int cvs_exclude;
+@@ -39,6 +39,7 @@ extern int cvs_exclude;
extern int io_error;
extern char *tmpdir;
extern char *compare_dest;
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
-@@ -200,12 +201,13 @@ static int get_tmpname(char *fnametmp, c
+@@ -206,12 +207,13 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -224,6 +226,9 @@ static int receive_data(int f_in, char *
+@@ -230,6 +232,9 @@ static int receive_data(int f_in, char *
} else
mapbuf = NULL;
sum_init(checksum_seed);
while ((i = recv_token(f_in, &data)) != 0) {
-@@ -240,6 +245,8 @@ static int receive_data(int f_in, char *
+@@ -246,6 +251,8 @@ static int receive_data(int f_in, char *
cleanup_got_literal = 1;
sum_update(data,i);
if (fd != -1 && write_file(fd,data,i) != i) {
rsyserr(FERROR, errno, "write failed on %s",
-@@ -267,6 +274,8 @@ static int receive_data(int f_in, char *
+@@ -273,6 +280,8 @@ static int receive_data(int f_in, char *
see_token(map, len);
sum_update(map,len);
}
if (!inplace || offset != offset2) {
-@@ -305,6 +314,8 @@ static int receive_data(int f_in, char *
+@@ -311,6 +320,8 @@ static int receive_data(int f_in, char *
}
sum_end(file_sum1);
if (mapbuf)
unmap_file(mapbuf);
-@@ -320,7 +331,7 @@ static int receive_data(int f_in, char *
+@@ -326,7 +337,7 @@ static int receive_data(int f_in, char *
static void discard_receive_data(int f_in, OFF_T length)
{
}
-@@ -508,8 +519,12 @@ int recv_files(int f_in, struct file_lis
- rprintf(FINFO, "%s\n", fname);
+@@ -535,8 +546,12 @@ int recv_files(int f_in, struct file_lis
+ rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
+#ifdef HAVE_LINK
log_recv(file, &initial_stats);
---- orig/rsync.c 2004-07-16 20:07:23
+--- orig/rsync.c 2004-07-26 16:06:53
+++ rsync.c 2004-07-16 20:16:53
@@ -33,6 +33,7 @@ extern int preserve_gid;
extern int force_delete;
extern char *backup_dir;
extern int inplace;
-@@ -250,6 +251,12 @@ void finish_transfer(char *fname, char *
+@@ -249,6 +250,12 @@ void finish_transfer(char *fname, char *
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
---- orig/rsync.h 2004-07-20 21:36:08
+--- orig/rsync.h 2004-07-23 17:16:13
+++ rsync.h 2004-07-03 20:20:15
@@ -522,6 +522,14 @@ struct stats {
int current_file_index;
---- orig/generator.c 2004-07-17 16:30:20
+--- orig/generator.c 2004-07-28 10:05:29
+++ generator.c 2004-07-03 20:20:46
@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
extern int csum_length;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -328,6 +329,10 @@ static void recv_generator(char *fname,
+@@ -336,6 +337,10 @@ static void recv_generator(char *fname,
&& verbose && f_out != -1)
- rprintf(FINFO,"%s/\n",fname);
+ rprintf(FINFO, "%s/\n", safe_fname(fname));
return;
+ } else if (max_size && file->length > max_size) {
+ if (verbose > 1)
}
if (preserve_links && S_ISLNK(file->mode)) {
---- orig/options.c 2004-07-16 20:07:22
+--- orig/options.c 2004-07-23 17:16:13
+++ options.c 2004-07-15 02:34:44
@@ -90,6 +90,7 @@ int delete_after = 0;
int only_existing = 0;
/** Local address to bind. As a character string because it's
* interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -266,6 +268,7 @@ void usage(enum logcode F)
+@@ -267,6 +269,7 @@ void usage(enum logcode F)
rprintf(F," --delete-after receiver deletes after transferring, not before\n");
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");
rprintf(F," --force force deletion of directories even if not empty\n");
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
-@@ -316,7 +319,7 @@ void usage(enum logcode F)
+@@ -317,7 +320,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_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -371,6 +374,7 @@ static struct poptOption long_options[]
+@@ -372,6 +375,7 @@ static struct poptOption long_options[]
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_INT, &block_size, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
-@@ -585,6 +589,32 @@ int parse_arguments(int *argc, const cha
+@@ -586,6 +590,32 @@ int parse_arguments(int *argc, const cha
read_batch = 1;
break;
case OPT_TIMEOUT:
if (io_timeout && io_timeout < select_timeout)
select_timeout = io_timeout;
-@@ -918,6 +948,11 @@ void server_options(char **args,int *arg
+@@ -924,6 +954,11 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
if (io_timeout) {
if (asprintf(&arg, "--timeout=%d", io_timeout) < 0)
goto oom;
---- orig/rsync.yo 2004-07-19 08:27:29
+--- orig/rsync.yo 2004-07-24 16:52:10
+++ rsync.yo 2004-07-03 20:20:46
@@ -316,6 +316,7 @@ verb(
--delete-after receiver deletes after transfer, not before
*argc = ac;
return;
---- orig/receiver.c 2004-07-23 17:16:13
+--- orig/receiver.c 2004-07-26 16:20:00
+++ receiver.c 2004-07-26 06:21:43
@@ -45,6 +45,7 @@ extern char *backup_dir;
extern char *backup_suffix;
extern int module_id;
extern int ignore_errors;
extern int orig_umask;
-@@ -338,7 +339,7 @@ int recv_files(int f_in, struct file_lis
+@@ -342,7 +343,7 @@ int recv_files(int f_in, struct file_lis
char *fname, fbuf[MAXPATHLEN];
char template[MAXPATHLEN];
char fnametmp[MAXPATHLEN];
char fnamecmpbuf[MAXPATHLEN];
struct file_struct *file;
struct stats initial_stats;
-@@ -551,7 +552,12 @@ int recv_files(int f_in, struct file_lis
+@@ -555,7 +556,12 @@ int recv_files(int f_in, struct file_lis
cleanup_disable();
int msgtype = csum_length == SUM_LENGTH || read_batch ?
FERROR : FINFO;
if (msgtype == FERROR || verbose) {
-@@ -570,9 +576,8 @@ int recv_files(int f_in, struct file_lis
- errstr, fname, keptstr, redostr);
+@@ -575,9 +581,8 @@ int recv_files(int f_in, struct file_lis
+ keptstr, redostr);
}
if (csum_length != SUM_LENGTH) {
- char buf[4];
dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files
even when there are I/O errors.
---- orig/sender.c 2004-07-20 21:36:08
-+++ sender.c 2004-07-16 20:10:19
+--- orig/sender.c 2004-07-26 16:27:00
++++ sender.c 2004-07-26 16:49:19
@@ -26,6 +26,7 @@ extern int io_error;
extern int dry_run;
extern int am_server;
while (1) {
unsigned int offset;
-@@ -246,6 +271,9 @@ void send_files(struct file_list *flist,
-
- if (verbose > 2)
- rprintf(FINFO, "sender finished %s\n", fname);
+@@ -248,6 +273,9 @@ void send_files(struct file_list *flist,
+ rprintf(FINFO, "sender finished %s\n",
+ safe_fname(fname));
+ }
+
+ /* Flag that we actually sent this entry. */
+ file->flags |= FLAG_SENT;