Updated patches to work with the current trunk.
[rsync/rsync-patches.git] / openssl-support.diff
index a86af0b..cc70ab5 100644 (file)
@@ -35,7 +35,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -51,17 +51,17 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/cleanup.c b/cleanup.c
 --- a/cleanup.c
 +++ b/cleanup.c
-@@ -25,6 +25,9 @@
- extern int am_server;
- extern int am_daemon;
+@@ -27,6 +27,9 @@ extern int am_daemon;
+ extern int am_sender;
+ extern int am_generator;
  extern int io_error;
 +#ifdef HAVE_OPENSSL
 +extern int use_ssl;
 +#endif
  extern int keep_partial;
  extern int got_xfer_error;
- extern int output_needs_newline;
-@@ -127,6 +130,14 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
+ extern int protocol_version;
+@@ -136,6 +139,14 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                                code, file, line);
                }
  
@@ -89,7 +89,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern int rsync_port;
  extern int protect_args;
  extern int ignore_errors;
-@@ -134,8 +137,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -133,8 +136,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
  #endif
  
        ret = start_inband_exchange(fd, fd, user, remote_argc, remote_argv);
@@ -109,7 +109,7 @@ diff --git a/clientserver.c b/clientserver.c
  }
  
  static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int am_client)
-@@ -278,6 +291,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -277,6 +290,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
        if (DEBUG_GTE(CMD, 1))
                print_child_argv("sending daemon args:", sargs);
  
@@ -142,7 +142,7 @@ diff --git a/clientserver.c b/clientserver.c
        io_printf(f_out, "%.*s\n", modlen, modname);
  
        /* Old servers may just drop the connection here,
-@@ -303,6 +342,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -302,6 +341,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
                         * server to terminate the listing of modules.
                         * We don't want to go on and transfer
                         * anything; just exit. */
@@ -153,7 +153,7 @@ diff --git a/clientserver.c b/clientserver.c
                        exit(0);
                }
  
-@@ -310,6 +353,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -309,6 +352,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
                        rprintf(FERROR, "%s\n", line);
                        /* This is always fatal; the server will now
                         * close the socket. */
@@ -164,7 +164,7 @@ diff --git a/clientserver.c b/clientserver.c
                        return -1;
                }
  
-@@ -1025,6 +1072,9 @@ int start_daemon(int f_in, int f_out)
+@@ -1028,6 +1075,9 @@ int start_daemon(int f_in, int f_out)
        if (exchange_protocols(f_in, f_out, line, sizeof line, 0) < 0)
                return -1;
  
@@ -174,7 +174,7 @@ diff --git a/clientserver.c b/clientserver.c
        line[0] = 0;
        if (!read_line_old(f_in, line, sizeof line))
                return -1;
-@@ -1036,6 +1086,20 @@ int start_daemon(int f_in, int f_out)
+@@ -1039,6 +1089,20 @@ int start_daemon(int f_in, int f_out)
                return -1;
        }
  
@@ -198,7 +198,7 @@ diff --git a/clientserver.c b/clientserver.c
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -303,6 +303,21 @@ if test x"$enable_locale" != x"no"; then
+@@ -312,6 +312,21 @@ if test x"$enable_locale" != x"no"; then
        AC_DEFINE(CONFIG_LOCALE)
  fi
  
@@ -281,15 +281,15 @@ diff --git a/options.c b/options.c
    rprintf(F,"     --version               print version number\n");
    rprintf(F,"(-h) --help                  show this help (-h works with no other options)\n");
  
-@@ -799,7 +818,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -798,7 +817,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+       OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
-       OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
--      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN,
-+      OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_USE_SSL,
+-      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
++      OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_USE_SSL,
+       OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
- static struct poptOption long_options[] = {
 @@ -1013,6 +1032,13 @@ static struct poptOption long_options[] = {
    {"checksum-seed",    0,  POPT_ARG_INT,    &checksum_seed, 0, 0, 0 },
    {"server",           0,  POPT_ARG_NONE,   0, OPT_SERVER, 0, 0 },
@@ -363,7 +363,7 @@ diff --git a/options.c b/options.c
                        *argv_p = argv = poptGetArgs(pc);
                        *argc_p = argc = count_args(argv);
                        am_starting_up = 0;
-@@ -1744,6 +1801,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1763,6 +1820,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -376,7 +376,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2126,6 +2189,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2145,6 +2208,17 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        if (delay_updates && !partial_dir)
                partial_dir = tmp_partialdir;
  
@@ -394,7 +394,7 @@ diff --git a/options.c b/options.c
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -2716,9 +2790,18 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
+@@ -2735,9 +2809,18 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
  {
        char *path;
  
@@ -427,7 +427,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define SYMLINK_PREFIX "/rsyncd-munged/"  /* This MUST have a trailing slash! */
  #define SYMLINK_PREFIX_LEN ((int)sizeof SYMLINK_PREFIX - 1)
-@@ -577,6 +578,11 @@ typedef unsigned int size_t;
+@@ -581,6 +582,11 @@ typedef unsigned int size_t;
  # define SIZEOF_INT64 SIZEOF_OFF_T
  #endif