Got rid of the changes to proto.h and mentioned the build instructions
authorWayne Davison <wayned@samba.org>
Thu, 13 May 2004 19:20:32 +0000 (19:20 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 13 May 2004 19:20:32 +0000 (19:20 +0000)
at the top of the file.

ODBC-dblog.diff
atimes.diff
chmod-option.diff
filter.diff
link-by-hash.diff
openssl-support.diff
remove-sent-files.diff
write-only.diff

index eff227f..c71ed01 100644 (file)
@@ -1,19 +1,95 @@
 Add support for logging daemon messages to an SQL database.
 
-After applying this patch you'll need to run autoconf and autoheader to
-generate updated versions of "configure" and "config.h.in".
+After applying this patch, run these commands for a successful build:
 
-You'll need to run configure with the --with-ODBC option in order for the
-extended features to be active.
+    autoconf
+    autoheader
+    ./configure --with-ODBC
+    make proto
+    make
 
-Patch provided by Steve Sether.
+Steve Sether writes:
 
-(Tweaked by Wayne Davison for rsync-style purposes but not compiled, so if the
-dblog.c file has a compile problem, it's probably my fault...)
+This patch adds the following options:
 
+"database logging"
+    If set to True, rsync will attempt to connect to
+    the specified datasource and write to the named tables.
+    Defaults to False.
 
---- Makefile.in        10 Feb 2004 17:06:11 -0000      1.98
-+++ Makefile.in        30 Apr 2004 18:08:05 -0000
+"database datasource"
+    Specifies the name of the ODBC data source to use.
+
+"database username"
+    The username to use when connecting to the database.
+
+"database password"
+    The password to use when connecting to the database.
+
+"transfer table name"
+    The name of the transfer table to log to.  This table contains individual
+    filenames, file sizes, bytes transferred, checksum bytes transferred,
+    operation (send or receive), and a timestamp.
+
+"session table name"
+    The name of the session table to log to.  This table contains the username,
+    module name, module path, ip address, process ID, and a timestamp.
+
+"exit table name"
+
+    The name of the exit table to log to.  This table contains the total bytes
+    read, total bytes written, total size of all files, error code, line the
+    error occured at, file the error occured at and the text of the error.
+    (most of which will be blank if the program exited normally).
+
+"unique id method"
+    Different databases use different methods to get a unique identifier.
+    Some databases support sequence objects, and use various forms of the
+    nextval command to retrieve a unique identifier from it.  Other databases
+    support an autonumber field, and support different methds of retrieving
+    the ID used in the last insert.  Valid values for this option are:
+
+       nextval-postgres
+           uses the syntax of nextval for PostgreSQL databases
+
+       nextval-oracle
+           uses the syntax of nextval for Oracle databases
+
+       nextval-db2
+           uses the syntax of nextval for DB2 databases
+
+       last_insert_id
+           uses the last_insert_id() command for the MySQL databases
+
+       @@IDENTITY
+           uses the @@IDENTITY command for Sybase databases
+
+       custom
+           Define your own method to get a unique identifier.  See the
+           "custom unique id select", and the "get custom id before select"
+           parameters.
+
+"sequence name"
+    If your database supports sequences, list the name of the sequence to use
+    for the session unique identifier.
+
+"custom unique id select"
+    Only used if you specify the custom method in "unique id method".  This is
+    a SQL statement to be executed to get a unique ID.  This SQL statement must
+    return one column with the unique ID to use for the session ID.  Should be
+    used in concert with the "get custom id before select" parameter.
+
+"get custom id before insert"
+    This parameter is ignored unless the "unique id method" is set to custom.
+    If set to true, the "custom unique id select" statement will be executed
+    BEFORE the session row is inserted into the database.  (as is done when a
+    sequence is used for unique IDs).  If False the statement will be executed
+    after the session row is inserted (as is done when the session ID is
+    automatically generates unique IDs).  Defaults to True.
+
+
+--- Makefile.in        2 May 2004 17:04:14 -0000       1.100
++++ Makefile.in        13 May 2004 18:17:08 -0000
 @@ -32,7 +32,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z
        zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
        zlib/zutil.o zlib/adler32.o
@@ -23,92 +99,9 @@ dblog.c file has a compile problem, it's probably my fault...)
  OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
        fileio.o batch.o clientname.o
  OBJS3=progress.o pipe.o
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ README-ODBC        30 Apr 2004 18:08:05 -0000
-@@ -0,0 +1,80 @@
-+This patch adds the following options:
-+
-+"database logging"
-+If set to True, rsync will attempt to connect to
-+the specified datasource and write to the named tables.
-+Defaults to False.
-+
-+
-+"database datasource"
-+Specifies the name of the ODBC data source to use.
-+
-+"database username"
-+The username to use when connecting to the database.
-+
-+"database password"
-+The password to use when connecting to the database.
-+
-+"transfer table name"
-+The name of the transfer table to log to.
-+This table contains individual filenames, file sizes, bytes transferred, checksum bytes transferred, operation (send or receive), and a timestamp.
-+
-+"session table name"
-+The name of the session table to log to.
-+This table contains the username, module name, module path, ip address, process ID, and a timestamp.
-+
-+"exit table name"
-+The name of the exit table to log to.
-+This table contains the total bytes read, total bytes written, total size
-+of all files, error code, line the error occured at, file the error occured at
-+and the text of the error. (most of which will be blank if the program exited normally).
-+
-+
-+"unique id method"
-+Different databases use different methods to get a unique identifier.
-+Some databases support sequence objects, and use various forms of the
-+nextval command to retrieve a unique identifier from it.  Other databases
-+support an autonumber field, and support different methds of retrieving
-+the ID used in the last insert.  Valid values for this option are:
-+
-+      nextval-postgres
-+      uses the syntax of nextval for PostgreSQL databases
-+
-+      nextval-oracle
-+      uses the syntax of nextval for Oracle databases
-+
-+      nextval-db2
-+      uses the syntax of nextval for  DB2 databases
-+
-+      last_insert_id
-+      uses the last_insert_id() command for the MySQL databases
-+
-+      @@IDENTITY
-+      uses the @@IDENTITY command for Sybase databases
-+
-+      custom
-+      Define your own method to get a unique identifier.  See the
-+      "custom unique id select", and the "get custom id before select"
-+      parameters.
-+
-+
-+"sequence name"
-+If your database supports sequences, list the name of the sequence to use
-+for the session unique identifier.
-+
-+"custom unique id select"
-+Only used if you specify the custom method in "unique id method".  This
-+is a SQL statement to be executed to get a unique ID.  This SQL
-+statement must return one column with the unique ID to use for
-+the session ID.  Should be used in concert with the "get custom
-+id before select" parameter.
-+
-+"get custom id before insert"
-+This parameter is ignored unless the "unique id method" is set to custom.
-+If set to true, the "custom unique id select" statement will
-+be executed BEFORE the session row is inserted into the database.
-+(as is done when a sequence is used for unique IDs).
-+If False the statement will be executed after the session
-+row is inserted (as is done when the session ID is automatically generates
-+unique IDs).
-+Defaults to True.
---- cleanup.c  27 Jan 2004 08:14:33 -0000      1.21
-+++ cleanup.c  30 Apr 2004 18:08:06 -0000
-@@ -138,7 +138,12 @@ void _exit_cleanup(int code, const char 
+--- cleanup.c  13 May 2004 07:08:18 -0000      1.22
++++ cleanup.c  13 May 2004 18:17:08 -0000
+@@ -140,7 +140,12 @@ void _exit_cleanup(int code, const char 
                        code = RERR_VANISHED;
        }
  
@@ -120,10 +113,10 @@ dblog.c file has a compile problem, it's probably my fault...)
 +#endif
 +      }
  
-       if (verbose > 2)
-               rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n", 
+       if (verbose > 2) {
+               rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): about to call exit(%d)\n",
 --- clientserver.c     14 Apr 2004 23:33:34 -0000      1.121
-+++ clientserver.c     30 Apr 2004 18:08:06 -0000
++++ clientserver.c     13 May 2004 18:17:08 -0000
 @@ -311,6 +311,9 @@ static int rsync_module(int f_in, int f_
        exclude_path_prefix = NULL;
  
@@ -145,7 +138,7 @@ dblog.c file has a compile problem, it's probably my fault...)
                        rprintf(FINFO,"rsync %s %s from %s (%s)\n",
                                am_sender?"on":"to",
 --- configure.in       30 Apr 2004 18:03:33 -0000      1.196
-+++ configure.in       30 Apr 2004 18:08:06 -0000
++++ configure.in       13 May 2004 18:17:08 -0000
 @@ -94,6 +94,8 @@ AC_ARG_WITH(rsync-path,
        [  --with-rsync-path=PATH  set default --rsync-path to PATH (default: rsync)],
        [ RSYNC_PATH="$with_rsync_path" ],
@@ -171,7 +164,7 @@ dblog.c file has a compile problem, it's probably my fault...)
  
  AC_MSG_CHECKING([whether to use included libpopt])
 --- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ dblog-tables-mysql.sql     30 Apr 2004 18:08:06 -0000
++++ dblog-tables-mysql.sql     13 May 2004 18:17:08 -0000
 @@ -0,0 +1,43 @@
 +drop table transfer;
 +drop table exit;
@@ -217,7 +210,7 @@ dblog.c file has a compile problem, it's probably my fault...)
 +      foreign key (session_id) references session (id)
 +);
 --- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ dblog-tables-postgresql.sql        30 Apr 2004 18:08:06 -0000
++++ dblog-tables-postgresql.sql        13 May 2004 18:17:08 -0000
 @@ -0,0 +1,45 @@
 +drop table transfer;
 +drop table exit;
@@ -265,7 +258,7 @@ dblog.c file has a compile problem, it's probably my fault...)
 +      foreign key (session_id) references session (id)
 +);
 --- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ dblog.c    30 Apr 2004 18:08:06 -0000
++++ dblog.c    13 May 2004 18:17:08 -0000
 @@ -0,0 +1,352 @@
 +/*
 + *  ODBC Database logging functions
@@ -620,7 +613,7 @@ dblog.c file has a compile problem, it's probably my fault...)
 +      }
 +}
 --- loadparm.c 4 Feb 2004 07:31:29 -0000       1.50
-+++ loadparm.c 30 Apr 2004 18:08:07 -0000
++++ loadparm.c 13 May 2004 18:17:08 -0000
 @@ -122,6 +122,17 @@ typedef struct
        BOOL list;
        BOOL use_chroot;
@@ -694,7 +687,7 @@ dblog.c file has a compile problem, it's probably my fault...)
  FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable)
  FN_LOCAL_STRING(lp_uid, uid)
 --- log.c      29 Apr 2004 19:34:31 -0000      1.72
-+++ log.c      30 Apr 2004 18:08:07 -0000
++++ log.c      13 May 2004 18:17:09 -0000
 @@ -75,7 +75,7 @@ struct {
  /*
   * Map from rsync error code to name, or return NULL.
@@ -705,7 +698,7 @@ dblog.c file has a compile problem, it's probably my fault...)
        int i;
        for (i = 0; rerr_names[i].name; i++) {
 --- main.c     10 Feb 2004 03:54:47 -0000      1.192
-+++ main.c     30 Apr 2004 18:08:07 -0000
++++ main.c     13 May 2004 18:17:09 -0000
 @@ -120,6 +120,9 @@ static void report(int f)
  
        if (am_daemon) {
@@ -716,50 +709,9 @@ dblog.c file has a compile problem, it's probably my fault...)
                if (f == -1 || !am_sender) return;
        }
  
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    30 Apr 2004 18:08:07 -0000
-@@ -51,6 +51,12 @@ int start_daemon(int f_in, int f_out);
- int daemon_main(void);
- void setup_protocol(int f_out,int f_in);
- int claim_connection(char *fname,int max_connections);
-+char *sanitizeSql(const char *input);
-+void db_log_open(void);
-+void db_log_close();
-+void db_log_session();
-+void db_log_transfer(struct file_struct *file,struct stats *initial_stats,char *operation);
-+void db_log_exit(int code, const char *file, int line);
- void free_exclude_list(struct exclude_list_struct *listp);
- int check_exclude(struct exclude_list_struct *listp, char *name, int name_is_dir);
- void add_exclude(struct exclude_list_struct *listp, const char *pattern,
-@@ -135,6 +141,17 @@ BOOL lp_read_only(int );
- BOOL lp_list(int );
- BOOL lp_use_chroot(int );
- BOOL lp_transfer_logging(int );
-+BOOL lp_database_logging(int );
-+char *lp_database_datasource(int );
-+char *lp_database_username(int );
-+char *lp_database_password(int );
-+char *lp_transfer_table_name(int );
-+char *lp_exit_table_name(int );
-+char *lp_session_table_name(int );
-+char *lp_sequence_name(int );
-+char *lp_unique_id_method(int );
-+char *lp_custom_unique_id_select(int );
-+BOOL lp_get_custom_id_before_insert(int );
- BOOL lp_ignore_errors(int );
- BOOL lp_ignore_nonreadable(int );
- char *lp_uid(int );
-@@ -156,6 +173,7 @@ int lp_max_connections(int );
- BOOL lp_load(char *pszFname, int globals_only);
- int lp_numservices(void);
- int lp_number(char *name);
-+char const *rerr_name(int code);
- void log_init(void);
- void log_open(void);
- void log_close(void);
---- receiver.c 27 Apr 2004 19:51:33 -0000      1.76
-+++ receiver.c 30 Apr 2004 18:08:08 -0000
-@@ -453,7 +453,9 @@ int recv_files(int f_in,struct file_list
+--- receiver.c 13 May 2004 07:08:22 -0000      1.77
++++ receiver.c 13 May 2004 18:17:09 -0000
+@@ -454,7 +454,9 @@ int recv_files(int f_in,struct file_list
                recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length);
  
                log_recv(file, &initial_stats);
@@ -770,11 +722,11 @@ dblog.c file has a compile problem, it's probably my fault...)
                if (mapbuf) unmap_file(mapbuf);
                if (fd1 != -1) {
                        close(fd1);
---- sender.c   17 Feb 2004 21:57:44 -0000      1.38
-+++ sender.c   30 Apr 2004 18:08:08 -0000
-@@ -283,6 +283,9 @@ void send_files(struct file_list *flist,
+--- sender.c   11 May 2004 19:53:16 -0000      1.39
++++ sender.c   13 May 2004 18:17:09 -0000
+@@ -280,6 +280,9 @@ void send_files(struct file_list *flist,
                } else  {
-                       match_sums(f_out, s, buf, st.st_size);
+                       match_sums(f_out, s, mbuf, st.st_size);
                        log_send(file, &initial_stats);
 +#ifdef HAVE_LIBODBC
 +                      db_log_transfer(file, &initial_stats,"send");
index e96b702..5af4cb7 100644 (file)
@@ -1,16 +1,11 @@
---- backup.c   4 May 2004 03:10:45 -0000       1.29
-+++ backup.c   8 May 2004 18:35:15 -0000
-@@ -102,7 +102,7 @@ static int make_bak_dir(char *fullpath)
-                                   "make_bak_dir stat %s failed: %s\n",
-                                   full_fname(rel), strerror(errno));
-                       } else {
--                              set_modtime(fullpath, st.st_mtime);
-+                              set_times(fullpath, st.st_mtime, time(NULL));
-                               do_lchown(fullpath, st.st_uid, st.st_gid);
-                               do_chmod(fullpath, st.st_mode);
-                       }
+After applying this patch and running configure, you MUST run this
+command before "make":
+
+    make proto
+
+
 --- batch.c    6 Mar 2004 07:45:52 -0000       1.31
-+++ batch.c    8 May 2004 18:35:16 -0000
++++ batch.c    13 May 2004 18:54:03 -0000
 @@ -342,6 +342,8 @@ void show_flist(int index, struct file_s
                rprintf(FINFO, "flist->flags=%#x\n", fptr[i]->flags);
                rprintf(FINFO, "flist->modtime=%#lx\n",
@@ -20,9 +15,9 @@
                rprintf(FINFO, "flist->length=%.0f\n",
                        (double) fptr[i]->length);
                rprintf(FINFO, "flist->mode=%#o\n", (int) fptr[i]->mode);
---- flist.c    3 May 2004 01:24:10 -0000       1.220
-+++ flist.c    8 May 2004 18:35:16 -0000
-@@ -58,6 +58,7 @@ extern int relative_paths;
+--- flist.c    11 May 2004 17:25:16 -0000      1.221
++++ flist.c    13 May 2004 18:54:03 -0000
+@@ -57,6 +57,7 @@ extern int relative_paths;
  extern int implied_dirs;
  extern int copy_links;
  extern int copy_unsafe_links;
@@ -30,7 +25,7 @@
  extern int protocol_version;
  extern int sanitize_paths;
  
-@@ -140,16 +141,16 @@ static void list_file_entry(struct file_
+@@ -139,16 +140,16 @@ static void list_file_entry(struct file_
  
  #if SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -51,7 +46,7 @@
  }
  
  
-@@ -326,6 +327,7 @@ void send_file_entry(struct file_struct 
+@@ -325,6 +326,7 @@ void send_file_entry(struct file_struct 
  {
        unsigned short flags;
        static time_t modtime;
@@ -59,7 +54,7 @@
        static mode_t mode;
        static uint64 dev;
        static dev_t rdev;
-@@ -341,7 +343,7 @@ void send_file_entry(struct file_struct 
+@@ -340,7 +342,7 @@ void send_file_entry(struct file_struct 
  
        if (!file) {
                write_byte(f, 0);
@@ -68,7 +63,7 @@
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -390,6 +392,12 @@ void send_file_entry(struct file_struct 
+@@ -389,6 +391,12 @@ void send_file_entry(struct file_struct 
                flags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -81,7 +76,7 @@
  
  #if SUPPORT_HARD_LINKS
        if (file->link_u.idev) {
-@@ -445,6 +453,8 @@ void send_file_entry(struct file_struct 
+@@ -444,6 +452,8 @@ void send_file_entry(struct file_struct 
                write_int(f, modtime);
        if (!(flags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -90,7 +85,7 @@
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
                if (!numeric_ids)
                        add_uid(uid);
-@@ -518,6 +528,7 @@ void receive_file_entry(struct file_stru
+@@ -517,6 +527,7 @@ void receive_file_entry(struct file_stru
      struct file_list *flist, int f)
  {
        static time_t modtime;
@@ -98,7 +93,7 @@
        static mode_t mode;
        static uint64 dev;
        static dev_t rdev;
-@@ -534,7 +545,7 @@ void receive_file_entry(struct file_stru
+@@ -533,7 +544,7 @@ void receive_file_entry(struct file_stru
        struct file_struct *file;
  
        if (!fptr) {
                dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
-@@ -589,6 +600,8 @@ void receive_file_entry(struct file_stru
+@@ -588,6 +599,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));
  
        if (preserve_uid && !(flags & XMIT_SAME_UID))
                uid = (uid_t)read_int(f);
-@@ -639,6 +652,7 @@ void receive_file_entry(struct file_stru
+@@ -638,6 +651,7 @@ void receive_file_entry(struct file_stru
  
        file->flags = flags & XMIT_TOP_DIR ? FLAG_TOP_DIR : 0;
        file->modtime = modtime;
        file->length = file_length;
        file->mode = mode;
        file->uid = uid;
-@@ -853,6 +867,7 @@ skip_excludes:
+@@ -852,6 +866,7 @@ skip_excludes:
  
        file->flags = flags;
        file->modtime = st.st_mtime;
        file->length = st.st_size;
        file->mode = st.st_mode;
        file->uid = st.st_uid;
---- generator.c        5 May 2004 17:15:03 -0000       1.81
-+++ generator.c        8 May 2004 18:35:16 -0000
+--- generator.c        13 May 2004 06:55:01 -0000      1.82
++++ generator.c        13 May 2004 18:54:03 -0000
 @@ -98,7 +98,7 @@ static int skip_file(char *fname, struct
                return 0;
        }
  }
  
  
-@@ -465,7 +465,7 @@ void recv_generator(char *fname, struct 
+@@ -466,7 +466,7 @@ void recv_generator(char *fname, struct 
                return;
        }
  
                        rprintf(FINFO,"%s is newer\n",fname);
                return;
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  8 May 2004 18:35:16 -0000
++++ options.c  13 May 2004 18:54:04 -0000
 @@ -46,6 +46,7 @@ int preserve_devices = 0;
  int preserve_uid = 0;
  int preserve_gid = 0;
        if (preserve_perms)
                argstr[x++] = 'p';
        if (recurse)
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    8 May 2004 18:35:17 -0000
-@@ -242,7 +242,7 @@ int fd_pair(int fd[2]);
- void print_child_argv(char **cmd);
- void out_of_memory(char *str);
- void overflow(char *str);
--int set_modtime(char *fname, time_t modtime);
-+int set_times(char *fname, time_t modtime, time_t atime);
- int create_directory_path(char *fname, int base_umask);
- int copy_file(char *source, char *dest, mode_t mode);
- int robust_unlink(char *fname);
-@@ -266,7 +266,7 @@ int u_strcmp(const char *cs1, const char
- int unsafe_symlink(const char *dest, const char *src);
- char *timestring(time_t t);
- int msleep(int t);
--int cmp_modtime(time_t file1, time_t file2);
-+int cmp_time(time_t file1, time_t file2);
- int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
- void *_new_array(unsigned int size, unsigned long num);
- void *_realloc_array(void *ptr, unsigned int size, unsigned long num);
---- rsync.c    23 Mar 2004 16:16:15 -0000      1.135
-+++ rsync.c    8 May 2004 18:35:17 -0000
+--- rsync.c    13 May 2004 18:51:22 -0000      1.138
++++ rsync.c    13 May 2004 18:54:04 -0000
 @@ -25,6 +25,7 @@
  extern int verbose;
  extern int dry_run;
  extern int preserve_times;
 +extern int copy_atimes;
  extern int am_root;
- extern int am_server;
  extern int am_sender;
-@@ -140,17 +141,28 @@ int set_perms(char *fname,struct file_st
-               st = &st2;
-       }
--      if (preserve_times && !S_ISLNK(st->st_mode) &&
--          cmp_modtime(st->st_mtime, file->modtime) != 0) {
-+      if (!S_ISLNK(st->st_mode) && (preserve_times || copy_atimes)) {
+ extern int am_generator;
+@@ -140,17 +141,31 @@ int set_perms(char *fname,struct file_st
+       if (!preserve_times || S_ISLNK(st->st_mode))
+               flags |= PERMS_SKIP_MTIME;
+-      if (!(flags & PERMS_SKIP_MTIME)
+-          && cmp_modtime(st->st_mtime, file->modtime) != 0) {
++      if (!copy_atimes || S_ISLNK(st->st_mode) || S_ISDIR(st->st_mode))
++              flags |= PERMS_SKIP_ATIME;
++      if (!(flags & (PERMS_SKIP_MTIME|PERMS_SKIP_ATIME))) {
 +              time_t atime, mtime;
 +
-+              if (copy_atimes && !S_ISDIR(st->st_mode)
++              if (!(flags & PERMS_SKIP_ATIME)
 +                  && cmp_time(st->st_atime, file->atime) != 0) {
 +                      atime = file->atime;
 +                      updated = 1;
 +              } else
 +                      atime = st->st_atime;
-+              if (preserve_times && cmp_time(st->st_mtime, file->modtime) != 0) {
++              if (!(flags & PERMS_SKIP_MTIME)
++                  && cmp_time(st->st_mtime, file->modtime) != 0) {
 +                      mtime = file->modtime;
 +                      updated = 1;
 +              } else
        }
  
        change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- rsync.h    2 May 2004 16:34:33 -0000       1.200
-+++ rsync.h    8 May 2004 18:35:17 -0000
+--- rsync.h    13 May 2004 18:51:22 -0000      1.203
++++ rsync.h    13 May 2004 18:54:04 -0000
 @@ -54,6 +54,7 @@
  #define XMIT_HAS_IDEV_DATA (1<<9)
  #define XMIT_SAME_DEV (1<<10)
  
  /* These flags are used in the live flist data. */
  
-@@ -419,6 +420,7 @@ struct file_struct {
+@@ -111,6 +112,7 @@
+ #define PERMS_REPORT          (1<<0)
+ #define PERMS_SKIP_MTIME      (1<<1)
++#define PERMS_SKIP_ATIME      (1<<2)
+ #define FULL_FLUSH    1
+ #define NORMAL_FLUSH  0
+@@ -422,6 +424,7 @@ struct file_struct {
                struct hlink *links;
        } link_u;
        time_t modtime;
        gid_t gid;
        mode_t mode;
 --- rsync.yo   7 May 2004 00:18:37 -0000       1.169
-+++ rsync.yo   8 May 2004 18:35:18 -0000
++++ rsync.yo   13 May 2004 18:54:05 -0000
 @@ -299,6 +299,7 @@ verb(
   -g, --group                 preserve group
   -D, --devices               preserve devices (root only)
  dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
  instead it will just report the actions it would have taken.
 --- tls.c      9 Apr 2004 20:22:44 -0000       1.19
-+++ tls.c      8 May 2004 18:35:18 -0000
++++ tls.c      13 May 2004 18:54:05 -0000
 @@ -39,6 +39,7 @@
  
  
  
        return 0;
  }
---- util.c     27 Apr 2004 19:59:37 -0000      1.141
-+++ util.c     8 May 2004 18:35:18 -0000
+--- util.c     8 May 2004 20:03:39 -0000       1.142
++++ util.c     13 May 2004 18:54:05 -0000
 @@ -124,32 +124,40 @@ void overflow(char *str)
  
  
                t[0].tv_usec = 0;
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
-@@ -1060,8 +1068,8 @@ int msleep(int t)
+@@ -1063,8 +1071,8 @@ int msleep(int t)
  
  
  /**
   * --modify-window).
   *
   * @retval 0 if the times should be treated as the same
-@@ -1070,7 +1078,7 @@ int msleep(int t)
+@@ -1073,7 +1081,7 @@ int msleep(int t)
   *
   * @retval -1 if the 2nd is later
   **/
        extern int modify_window;
  
 --- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ testsuite/copy-atimes.test 8 May 2004 18:35:18 -0000
++++ testsuite/copy-atimes.test 13 May 2004 18:54:05 -0000
 @@ -0,0 +1,22 @@
 +#! /bin/sh
 +
 +# The script would have aborted on error, so getting here means we've won.
 +exit 0
 --- testsuite/rsync.fns        4 Feb 2004 07:32:48 -0000       1.59
-+++ testsuite/rsync.fns        8 May 2004 18:35:18 -0000
++++ testsuite/rsync.fns        13 May 2004 18:54:05 -0000
 @@ -51,7 +51,7 @@ printmsg() {
  
  
index 749afa6..0886dbc 100644 (file)
@@ -1,5 +1,11 @@
+After applying this patch and running configure, you MUST run this
+command before "make":
+
+    make proto
+
+
 --- Makefile.in        2 May 2004 17:04:14 -0000       1.100
-+++ Makefile.in        8 May 2004 18:34:49 -0000
++++ Makefile.in        13 May 2004 18:36:43 -0000
 @@ -34,7 +34,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z
  OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o \
        main.o checksum.o match.o syscall.o log.o backup.o
@@ -10,7 +16,7 @@
  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
-+++ chmod.c    8 May 2004 18:34:49 -0000
++++ chmod.c    13 May 2004 18:36:43 -0000
 @@ -0,0 +1,184 @@
 +#include "rsync.h"
 +
 +      }
 +      return 0;
 +}
---- flist.c    3 May 2004 01:24:10 -0000       1.220
-+++ flist.c    8 May 2004 18:34:49 -0000
+--- flist.c    11 May 2004 17:25:16 -0000      1.221
++++ flist.c    13 May 2004 18:36:43 -0000
 @@ -33,6 +33,7 @@ extern int verbose;
  extern int do_progress;
  extern int am_root;
  extern int am_daemon;
  extern int always_checksum;
  extern int module_id;
-@@ -64,6 +65,8 @@ extern int sanitize_paths;
+@@ -63,6 +64,8 @@ extern int sanitize_paths;
  extern int read_batch;
  extern int write_batch;
  
  extern struct exclude_list_struct exclude_list;
  extern struct exclude_list_struct server_exclude_list;
  extern struct exclude_list_struct local_exclude_list;
-@@ -854,7 +857,10 @@ skip_excludes:
+@@ -853,7 +856,10 @@ skip_excludes:
        file->flags = flags;
        file->modtime = st.st_mtime;
        file->length = st.st_size;
        file->gid = st.st_gid;
  
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  8 May 2004 18:34:49 -0000
++++ options.c  13 May 2004 18:36:43 -0000
 @@ -121,6 +121,7 @@ char *log_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
        }
  
        if (files_from && (!am_sender || remote_filesfrom_file)) {
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    8 May 2004 18:34:49 -0000
-@@ -25,6 +25,9 @@ void file_checksum(char *fname,char *sum
- void sum_init(void);
- void sum_update(char *p, int len);
- void sum_end(char *sum);
-+struct chmod_mode_struct *parse_chmod(char *modestr);
-+int tweak_mode(int mode, struct chmod_mode_struct *chmod_modes);
-+int free_chmod_mode(struct chmod_mode_struct *chmod_modes);
- void close_all(void);
- void _exit_cleanup(int code, const char *file, int line);
- void cleanup_disable(void);
 --- rsync.yo   7 May 2004 00:18:37 -0000       1.169
-+++ rsync.yo   8 May 2004 18:34:50 -0000
++++ rsync.yo   13 May 2004 18:36:44 -0000
 @@ -299,6 +299,7 @@ verb(
   -g, --group                 preserve group
   -D, --devices               preserve devices (root only)
  dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
  instead it will just report the actions it would have taken.
 --- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ testsuite/chmod.test       8 May 2004 18:34:50 -0000
++++ testsuite/chmod.test       13 May 2004 18:36:44 -0000
 @@ -0,0 +1,43 @@
 +#! /bin/sh
 +
index 1ed3c98..12b9343 100644 (file)
@@ -1,3 +1,8 @@
+After applying this patch and running configure, you MUST run this
+command before "make":
+
+    make proto
+
 This patch adds the ability to merge rules into your excludes/includes
 using a ". FILE" idiom.  If you specify a name without slashes, that
 filename will be looked for in every subdirectory that rsync visits,
@@ -542,18 +547,6 @@ for the current dir because its name contained a slash.
  
        closedir(d);
  }
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    8 May 2004 18:38:52 -0000
-@@ -51,7 +51,8 @@ int start_daemon(int f_in, int f_out);
- int daemon_main(void);
- void setup_protocol(int f_out,int f_in);
- int claim_connection(char *fname,int max_connections);
--void free_exclude_list(struct exclude_list_struct *listp);
-+void *push_local_excludes(char *fname, unsigned int offset);
-+void pop_local_excludes(void *mem);
- int check_exclude(struct exclude_list_struct *listp, char *name, int name_is_dir);
- void add_exclude(struct exclude_list_struct *listp, const char *pattern,
-                int xflags);
 --- rsync.h    2 May 2004 16:34:33 -0000       1.200
 +++ rsync.h    8 May 2004 18:38:52 -0000
 @@ -490,18 +490,21 @@ struct map_struct {
index 1dec7d9..56327cd 100644 (file)
@@ -1,43 +1,29 @@
-To: rsync@lists.samba.org
-From: "Jason M. Felice" <jfelice@cronosys.com>
-Subject: [patch] Add `--link-by-hash' option (rev 5).
-Date: Mon, 23 Feb 2004 13:29:08 -0500
+After applying this patch and running configure, you MUST run this
+command before "make":
+
+    make proto
+
+Jason M. Felice writes:
 
 This patch adds the --link-by-hash=DIR option, which hard links received
 files in a link farm arranged by MD4 file hash.  The result is that the system
 will only store one copy of the unique contents of each file, regardless of
 the file's name.
 
-(rev 5)
-* Fixed silly logic error.
-
-(rev 4)
-* Updated for committed robust_rename() patch, other changes in CVS.
-
-(rev 3)
-* Don't link empty files.
-* Roll over to new file when filesystem maximum link count is reached.
-* If link fails for another reason, leave non-linked file there.
-* Depends on rsync-rename.diff
-
-(rev 2)
-* This revision is actually against CVS HEAD (I didn't realize I was working
-  from a stale rsync'd CVS).
-* Apply permissions after linking (permissions were lost if we already had
-  a copy of the file in the link farm).
-
-Patch Summary:
-
-    -1   +1    Makefile.in
-    -0   +351  hashlink.c (new)
-    -1   +22   options.c
-    -0   +6    proto.h
-    -6   +21   receiver.c
-    -2   +8    rsync.c
-    -0   +8    rsync.h
 
---- hashlink.c 1969-12-31 19:00:00.000000000 -0500
-+++ hashlink.c 2004-02-23 10:30:45.000000000 -0500
+--- Makefile.in        2 May 2004 17:04:14 -0000       1.100
++++ Makefile.in        13 May 2004 19:04:49 -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 \
+       fileio.o batch.o clientname.o
+-OBJS3=progress.o pipe.o
++OBJS3=progress.o pipe.o hashlink.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 \
+       popt/popthelp.o popt/poptparse.o
+--- /dev/null  1 Jan 1970 00:00:00 -0000
++++ hashlink.c 13 May 2004 19:04:49 -0000
 @@ -0,0 +1,351 @@
 +/*
 +   Copyright (C) Cronosys, LLC 2004
@@ -390,19 +376,8 @@ Patch Summary:
 +}
 +
 +#endif
---- Makefile.in        10 Feb 2004 17:06:11 -0000      1.98
-+++ Makefile.in        15 Apr 2004 19:18:59 -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 \
-       fileio.o batch.o clientname.o
--OBJS3=progress.o pipe.o
-+OBJS3=progress.o pipe.o hashlink.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 \
-       popt/popthelp.o popt/poptparse.o
---- options.c  14 Apr 2004 23:33:34 -0000      1.146
-+++ options.c  15 Apr 2004 19:19:00 -0000
+--- options.c  6 May 2004 21:08:01 -0000       1.148
++++ options.c  13 May 2004 19:04:49 -0000
 @@ -121,6 +121,7 @@ char *log_format = NULL;
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
@@ -468,32 +443,17 @@ Patch Summary:
        }
  
        if (files_from && (!am_sender || remote_filesfrom_file)) {
---- proto.h    14 Apr 2004 23:33:30 -0000      1.188
-+++ proto.h    15 Apr 2004 19:19:00 -0000
-@@ -91,6 +91,12 @@ char *f_name(struct file_struct *f);
- void write_sum_head(int f, struct sum_struct *sum);
- void recv_generator(char *fname, struct file_struct *file, int i, int f_out);
- void generate_files(int f, struct file_list *flist, char *local_name);
-+char* make_hash_name(struct file_struct *file);
-+void kill_hashfile(struct hashfile_struct *hashfile);
-+void kill_hashfiles(struct hashfile_struct *hashfiles);
-+struct hashfile_struct *find_hashfiles(char *hashname, int64 size, long *fnbr);
-+struct hashfile_struct *compare_hashfiles(int fd,struct hashfile_struct *files);
-+int link_by_hash(char *fnametmp,char *fname,struct file_struct *file);
- void init_hard_links(struct file_list *flist);
- int hard_link_check(struct file_struct *file, int skip);
- void do_hard_links(void);
---- receiver.c 23 Mar 2004 16:50:40 -0000      1.75
-+++ receiver.c 15 Apr 2004 19:19:00 -0000
-@@ -45,6 +45,7 @@ extern int cleanup_got_literal;
- extern int module_id;
+--- receiver.c 13 May 2004 07:08:22 -0000      1.77
++++ receiver.c 13 May 2004 19:04:49 -0000
+@@ -46,6 +46,7 @@ extern int module_id;
  extern int ignore_errors;
  extern int orig_umask;
+ extern int keep_partial;
 +extern char *link_by_hash_dir;
  
  static void delete_one(char *fn, int is_dir)
  {
-@@ -190,10 +191,11 @@ static int get_tmpname(char *fnametmp, c
+@@ -191,10 +192,11 @@ static int get_tmpname(char *fnametmp, c
  
  
  static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname,
@@ -506,7 +466,7 @@ Patch Summary:
        unsigned int len;
        OFF_T offset = 0;
        OFF_T offset2;
-@@ -203,7 +205,9 @@ static int receive_data(int f_in,struct 
+@@ -204,7 +206,9 @@ static int receive_data(int f_in,struct 
        char *map=NULL;
  
        read_sum_head(f_in, &sum);
@@ -517,7 +477,7 @@ Patch Summary:
        sum_init();
  
        while ((i = recv_token(f_in, &data)) != 0) {
-@@ -220,6 +224,8 @@ static int receive_data(int f_in,struct 
+@@ -221,6 +225,8 @@ static int receive_data(int f_in,struct 
                        cleanup_got_literal = 1;
  
                        sum_update(data,i);
@@ -526,7 +486,7 @@ Patch Summary:
  
                        if (fd != -1 && write_file(fd,data,i) != i) {
                                rprintf(FERROR, "write failed on %s: %s\n",
-@@ -247,6 +253,8 @@ static int receive_data(int f_in,struct 
+@@ -248,6 +254,8 @@ static int receive_data(int f_in,struct 
  
                        see_token(map, len);
                        sum_update(map,len);
@@ -535,7 +495,7 @@ Patch Summary:
                }
  
                if (fd != -1 && write_file(fd,map,len) != (int) len) {
-@@ -269,6 +277,8 @@ static int receive_data(int f_in,struct 
+@@ -270,6 +278,8 @@ static int receive_data(int f_in,struct 
        }
  
        sum_end(file_sum1);
@@ -544,7 +504,7 @@ Patch Summary:
  
        read_buf(f_in,file_sum2,MD4_SUM_LENGTH);
        if (verbose > 2) {
-@@ -372,7 +382,7 @@ int recv_files(int f_in,struct file_list
+@@ -373,7 +383,7 @@ int recv_files(int f_in,struct file_list
                if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
                        rprintf(FERROR, "fstat %s failed: %s\n",
                                full_fname(fnamecmp), strerror(errno));
@@ -553,7 +513,7 @@ Patch Summary:
                        close(fd1);
                        continue;
                }
-@@ -385,7 +395,7 @@ int recv_files(int f_in,struct file_list
+@@ -386,7 +396,7 @@ int recv_files(int f_in,struct file_list
                         */
                        rprintf(FERROR,"recv_files: %s is a directory\n",
                                full_fname(fnamecmp));
@@ -562,7 +522,7 @@ Patch Summary:
                        close(fd1);
                        continue;
                }
-@@ -437,7 +447,7 @@ int recv_files(int f_in,struct file_list
+@@ -438,7 +448,7 @@ int recv_files(int f_in,struct file_list
                if (fd2 == -1) {
                        rprintf(FERROR, "mkstemp %s failed: %s\n",
                                full_fname(fnametmp), strerror(errno));
@@ -571,7 +531,7 @@ Patch Summary:
                        if (mapbuf) unmap_file(mapbuf);
                        if (fd1 != -1) close(fd1);
                        continue;
-@@ -450,7 +460,12 @@ int recv_files(int f_in,struct file_list
+@@ -451,7 +461,12 @@ int recv_files(int f_in,struct file_list
                }
  
                /* recv file data */
@@ -585,17 +545,17 @@ Patch Summary:
  
                log_recv(file, &initial_stats);
  
---- rsync.c    23 Mar 2004 16:16:15 -0000      1.135
-+++ rsync.c    15 Apr 2004 19:19:00 -0000
-@@ -33,6 +33,7 @@ extern int preserve_uid;
+--- rsync.c    13 May 2004 18:51:22 -0000      1.138
++++ rsync.c    13 May 2004 19:04:49 -0000
+@@ -31,6 +31,7 @@ extern int am_generator;
+ extern int preserve_uid;
  extern int preserve_gid;
- extern int preserve_perms;
  extern int make_backups;
 +extern char *link_by_hash_dir;
  
  
  /*
-@@ -235,8 +236,12 @@ void finish_transfer(char *fname, char *
+@@ -236,8 +237,12 @@ void finish_transfer(char *fname, char *
        if (make_backups && !make_backup(fname))
                return;
  
@@ -610,9 +570,9 @@ Patch Summary:
        if (ret < 0) {
                rprintf(FERROR, "%s %s -> \"%s\": %s\n",
                    ret == -2 ? "copy" : "rename",
---- rsync.h    14 Apr 2004 23:33:37 -0000      1.196
-+++ rsync.h    15 Apr 2004 19:19:00 -0000
-@@ -518,6 +518,14 @@ struct stats {
+--- rsync.h    13 May 2004 18:51:22 -0000      1.203
++++ rsync.h    13 May 2004 19:04:50 -0000
+@@ -521,6 +521,14 @@ struct stats {
        int current_file_index;
  };
  
index ceb98c1..79b7c74 100644 (file)
@@ -1,7 +1,12 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+After applying this patch, run these commands for a successful build:
 
-Hi.
+    autoconf
+    autoheader
+    ./configure
+    make proto
+    make
+
+Casey Marshall writes:
 
 I've been hacking together a way to use rsync with OpenSSL, and have
 attached my current patch against a recent CVS tree. The details of
@@ -31,24 +36,9 @@ this implementation are:
 All warnings apply; I don't do C programming all that often, so I
 can't say if I've left any cleanup/compatibility errors in the code.
 
-Also: <http://rsync.samba.org/lists.html> refers to the (now gone)
-smart-questions document on tuxedo.org, which should now be catb.org.
-
-Cheers,
-
-- -- 
-Casey Marshall || rsdio@metastatic.org
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.1 (GNU/Linux)
-Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
-
-iD8DBQE/ih9xgAuWMgRGsWsRAp8RAJ0XyONLiOSDgHHAOBRNO6sZ/P2dRwCeKfu8
-LEvhhkUglOm3xMyrdJT4u9Q=
-=aT/N
------END PGP SIGNATURE-----
 
 --- Makefile.in        2 May 2004 17:04:14 -0000       1.100
-+++ Makefile.in        8 May 2004 18:40:16 -0000
++++ Makefile.in        13 May 2004 19:07:03 -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 \
@@ -58,19 +48,19 @@ LEvhhkUglOm3xMyrdJT4u9Q=
  
  TLS_OBJ = tls.o syscall.o lib/permstring.o
  
---- cleanup.c  27 Jan 2004 08:14:33 -0000      1.21
-+++ cleanup.c  8 May 2004 18:40:16 -0000
-@@ -87,6 +87,9 @@ void _exit_cleanup(int code, const char 
      int ocode = code;
      extern int keep_partial;
      extern int log_got_error;
+--- cleanup.c  13 May 2004 07:08:18 -0000      1.22
++++ cleanup.c  13 May 2004 19:07:03 -0000
+@@ -24,6 +24,9 @@
extern int io_error;
+ extern int keep_partial;
+ extern int log_got_error;
 +#ifdef HAVE_OPENSSL
-+      extern int use_ssl;
++extern int use_ssl;
 +#endif
-       static int inside_cleanup = 0;
  
-       if (inside_cleanup > 10) {
-@@ -97,6 +100,11 @@ void _exit_cleanup(int code, const char 
+ /**
+  * Close all open sockets and files, allowing a (somewhat) graceful
+@@ -98,6 +101,11 @@ void _exit_cleanup(int code, const char 
  
        signal(SIGUSR1, SIG_IGN);
        signal(SIGUSR2, SIG_IGN);
@@ -80,10 +70,10 @@ LEvhhkUglOm3xMyrdJT4u9Q=
 +              end_tls();
 +#endif
  
-       if (verbose > 3)
-               rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n", 
+       if (verbose > 3) {
+               rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",
 --- clientserver.c     14 Apr 2004 23:33:34 -0000      1.121
-+++ clientserver.c     8 May 2004 18:40:16 -0000
++++ clientserver.c     13 May 2004 19:07:03 -0000
 @@ -46,6 +46,9 @@ extern int io_timeout;
  extern int orig_umask;
  extern int no_detach;
@@ -200,7 +190,7 @@ LEvhhkUglOm3xMyrdJT4u9Q=
                if (*line == '#') {
                        /* it's some sort of command that I don't understand */
 --- config.h.in        29 Apr 2004 19:40:39 -0000      1.90
-+++ config.h.in        8 May 2004 18:40:16 -0000
++++ config.h.in        13 May 2004 19:07:03 -0000
 @@ -167,6 +167,9 @@
  /* */
  #undef HAVE_OFF64_T
@@ -212,7 +202,7 @@ LEvhhkUglOm3xMyrdJT4u9Q=
  #undef HAVE_READLINK
  
 --- configure.in       30 Apr 2004 18:03:33 -0000      1.196
-+++ configure.in       8 May 2004 18:40:16 -0000
++++ configure.in       13 May 2004 19:07:03 -0000
 @@ -271,6 +271,21 @@ yes
        AC_SEARCH_LIBS(getaddrinfo, inet6)
  fi
@@ -236,7 +226,7 @@ LEvhhkUglOm3xMyrdJT4u9Q=
  case $host_os in
        *cygwin* ) AC_MSG_RESULT(yes)
 --- main.c     10 Feb 2004 03:54:47 -0000      1.192
-+++ main.c     8 May 2004 18:40:16 -0000
++++ main.c     13 May 2004 19:07:03 -0000
 @@ -51,6 +51,9 @@ extern int rsync_port;
  extern int read_batch;
  extern int write_batch;
@@ -313,7 +303,7 @@ LEvhhkUglOm3xMyrdJT4u9Q=
                                if (p) {
                                        *p = 0;
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  8 May 2004 18:40:17 -0000
++++ options.c  13 May 2004 19:07:04 -0000
 @@ -130,6 +130,14 @@ int quiet = 0;
  int always_checksum = 0;
  int list_only = 0;
@@ -436,23 +426,8 @@ LEvhhkUglOm3xMyrdJT4u9Q=
  
        if (files_from) {
                char *colon;
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    8 May 2004 18:40:17 -0000
-@@ -209,6 +209,12 @@ void start_accept_loop(int port, int (*f
- void set_socket_options(int fd, char *options);
- void become_daemon(void);
- int sock_exec(const char *prog);
-+int init_tls(void);
-+char *get_ssl_error(void);
-+int get_tls_rfd(void);
-+int get_tls_wfd(void);
-+int start_tls(int f_in, int f_out);
-+void end_tls(void);
- int do_unlink(char *fname);
- int do_symlink(char *fname1, char *fname2);
- int do_link(char *fname1, char *fname2);
---- rsync.h    2 May 2004 16:34:33 -0000       1.200
-+++ rsync.h    8 May 2004 18:40:17 -0000
+--- rsync.h    13 May 2004 18:51:22 -0000      1.203
++++ rsync.h    13 May 2004 19:07:04 -0000
 @@ -32,6 +32,7 @@
  
  #define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock"
@@ -461,7 +436,7 @@ LEvhhkUglOm3xMyrdJT4u9Q=
  
  #define BACKUP_SUFFIX "~"
  
-@@ -321,6 +322,11 @@ enum msgcode {
+@@ -324,6 +325,11 @@ enum msgcode {
  #else
  /* As long as it gets... */
  #define uint64 unsigned off_t
@@ -474,7 +449,7 @@ LEvhhkUglOm3xMyrdJT4u9Q=
  
  /* Starting from protocol version 26, we always use 64-bit
 --- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ ssl.c      8 May 2004 18:40:17 -0000
++++ ssl.c      13 May 2004 19:07:04 -0000
 @@ -0,0 +1,366 @@
 +/* -*- c-file-style: "linux" -*-
 + * ssl.c: operations for negotiating SSL rsync connections. 
index 38143e4..9eaf7a0 100644 (file)
@@ -1,5 +1,11 @@
+After applying this patch and running configure, you MUST run this
+command before "make":
+
+    make proto
+
+
 --- io.c       8 May 2004 18:03:43 -0000       1.120
-+++ io.c       8 May 2004 18:48:44 -0000
++++ io.c       13 May 2004 18:57:54 -0000
 @@ -222,6 +222,14 @@ static void read_msg_fd(void)
                read_loop(fd, buf, 4);
                redo_list_add(IVAL(buf,0));
@@ -33,7 +39,7 @@
                case MSG_INFO:
                case MSG_ERROR:
 --- main.c     10 Feb 2004 03:54:47 -0000      1.192
-+++ main.c     8 May 2004 18:48:45 -0000
++++ main.c     13 May 2004 18:57:54 -0000
 @@ -42,6 +42,7 @@ extern int list_only;
  extern int local_server;
  extern int log_got_error;
@@ -62,7 +68,7 @@
        if (argc == 0) {
                list_only = 1;
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  8 May 2004 18:48:45 -0000
++++ options.c  13 May 2004 18:57:55 -0000
 @@ -84,6 +84,7 @@ int copy_unsafe_links = 0;
  int size_only = 0;
  int bwlimit = 0;
  
        *argc = ac;
        return;
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    8 May 2004 18:48:45 -0000
-@@ -197,6 +197,7 @@ void sig_int(void);
- void finish_transfer(char *fname, char *fnametmp, struct file_struct *file);
- const char *who_am_i(void);
- void read_sum_head(int f, struct sum_struct *sum);
-+void successful_send(int i);
- void send_files(struct file_list *flist, int f_out, int f_in);
- int try_bind_local(int s, int ai_family, int ai_socktype,
-                  const char *bind_address);
---- receiver.c 27 Apr 2004 19:51:33 -0000      1.76
-+++ receiver.c 8 May 2004 18:48:45 -0000
-@@ -45,6 +45,7 @@ extern int cleanup_got_literal;
- extern int module_id;
+--- receiver.c 13 May 2004 07:08:22 -0000      1.77
++++ receiver.c 13 May 2004 18:57:55 -0000
+@@ -46,6 +46,7 @@ extern int module_id;
  extern int ignore_errors;
  extern int orig_umask;
+ extern int keep_partial;
 +extern int delete_sent_files;
  
  static void delete_one(char *fn, int is_dir)
  {
-@@ -292,7 +293,7 @@ int recv_files(int f_in,struct file_list
+@@ -293,7 +294,7 @@ int recv_files(int f_in,struct file_list
        char *fname, fbuf[MAXPATHLEN];
        char template[MAXPATHLEN];
        char fnametmp[MAXPATHLEN];
        char fnamecmpbuf[MAXPATHLEN];
        struct map_struct *mapbuf;
        int i;
-@@ -471,16 +472,20 @@ int recv_files(int f_in,struct file_list
+@@ -475,16 +476,20 @@ int recv_files(int f_in,struct file_list
  
                cleanup_disable();
  
                        }
                }
        }
---- rsync.h    8 May 2004 18:48:09 -0000       1.201
-+++ rsync.h    8 May 2004 18:48:45 -0000
+--- rsync.h    13 May 2004 18:51:22 -0000      1.203
++++ rsync.h    13 May 2004 18:57:55 -0000
 @@ -60,6 +60,7 @@
  #define FLAG_TOP_DIR (1<<0)
  #define FLAG_HLINK_EOL (1<<1) /* generator only */
  
  /* update this if you make incompatible changes */
  #define PROTOCOL_VERSION 28
-@@ -120,6 +121,7 @@ enum logcode { FERROR=1, FINFO=2, FLOG=3
+@@ -123,6 +124,7 @@ enum logcode { FERROR=1, FINFO=2, FLOG=3
  /* Messages types that are sent over the message channel.  The logcode
   * values must all be present here with identical numbers. */
  enum msgcode {
        MSG_REDO=4,     /* reprocess indicated flist index */
        MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */
 --- rsync.yo   7 May 2004 00:18:37 -0000       1.169
-+++ rsync.yo   8 May 2004 18:48:46 -0000
++++ rsync.yo   13 May 2004 18:57:56 -0000
 @@ -312,6 +312,7 @@ verb(
       --delete                delete files that don't exist on sender
       --delete-excluded       also delete excluded files on receiver
  
  dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files
  even when there are I/O errors.
---- sender.c   17 Feb 2004 21:57:44 -0000      1.38
-+++ sender.c   8 May 2004 18:48:46 -0000
+--- sender.c   11 May 2004 19:53:16 -0000      1.39
++++ sender.c   13 May 2004 18:57:56 -0000
 @@ -27,6 +27,7 @@ extern int dry_run;
  extern int am_server;
  extern int am_daemon;
        while (1) {
                unsigned int offset;
  
-@@ -302,6 +327,9 @@ void send_files(struct file_list *flist,
+@@ -299,6 +324,9 @@ void send_files(struct file_list *flist,
  
                if (verbose > 2)
                        rprintf(FINFO, "sender finished %s\n", fname);
index 89ee856..cb617f1 100644 (file)
@@ -1,16 +1,15 @@
-From: peter pan <lanwanhr@yahoo.com>
-Subject: [PATCH] write only
-Date: Thu, 12 Feb 2004 04:08:00 -0800 (PST)
+After applying this patch and running configure, you MUST run this
+command before "make":
+
+    make proto
+
+peter pan (lanwanhr@yahoo.com) writes:
 
 I've added a write only option to rsyncd.conf which is essentially the opposite
 of read only.  This means that although it's possible someone on our allowed IP
 range could overwrite (or delete) files on the rsync share, they would not be
 allowed to download any files (my primary concern).
 
-J
-
-[Updated to CVS version by Wayne Davison.]
-
 
 --- loadparm.c 4 Feb 2004 07:31:29 -0000       1.50
 +++ loadparm.c 22 Apr 2004 23:49:29 -0000
@@ -61,13 +60,3 @@ J
        if (!relative_paths && !push_dir(dir)) {
                rprintf(FERROR, "push_dir %s failed: %s (3)\n",
                        full_fname(dir), strerror(errno));
---- proto.h    22 Apr 2004 09:58:09 -0000      1.189
-+++ proto.h    22 Apr 2004 23:49:29 -0000
-@@ -132,6 +132,7 @@ char *lp_comment(int );
- char *lp_path(int );
- char *lp_lock_file(int );
- BOOL lp_read_only(int );
-+BOOL lp_write_only(int );
- BOOL lp_list(int );
- BOOL lp_use_chroot(int );
- BOOL lp_transfer_logging(int );