extern int rsync_port;
extern int protect_args;
extern int ignore_errors;
-@@ -128,8 +131,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -126,8 +129,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);
}
static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int am_client)
-@@ -272,6 +285,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -270,6 +283,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
if (verbose > 1)
print_child_argv("sending daemon args:", sargs);
io_printf(f_out, "%.*s\n", modlen, modname);
/* Old servers may just drop the connection here,
-@@ -297,6 +336,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -295,6 +334,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. */
exit(0);
}
-@@ -304,6 +347,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -302,6 +345,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. */
return -1;
}
-@@ -941,6 +988,9 @@ int start_daemon(int f_in, int f_out)
+@@ -935,6 +982,9 @@ int start_daemon(int f_in, int f_out)
if (exchange_protocols(f_in, f_out, line, sizeof line, 0) < 0)
return -1;
line[0] = 0;
if (!read_line_old(f_in, line, sizeof line))
return -1;
-@@ -952,6 +1002,20 @@ int start_daemon(int f_in, int f_out)
+@@ -946,6 +996,20 @@ int start_daemon(int f_in, int f_out)
return -1;
}
if (inplace) {
#ifdef HAVE_FTRUNCATE
if (partial_dir) {
-@@ -2067,10 +2141,27 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
+@@ -2072,10 +2146,27 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
char *p;
int not_host;
int hostlen;
#define SYMLINK_PREFIX "/rsyncd-munged/"
#define SYMLINK_PREFIX_LEN ((int)sizeof SYMLINK_PREFIX - 1)
-@@ -539,6 +540,11 @@ typedef unsigned int size_t;
+@@ -547,6 +548,11 @@ typedef unsigned int size_t;
# define SIZEOF_INT64 SIZEOF_OFF_T
#endif
+++ b/ssl.c
@@ -0,0 +1,370 @@
+/* -*- c-file-style: "linux" -*-
-+ * ssl.c: operations for negotiating SSL rsync connections.
++ * ssl.c: operations for negotiating SSL rsync connections.
+ *
+ * Copyright (C) 2003 Casey Marshall <rsdio@metastatic.org>
+ *
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
-+ *
++ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
-+ *
++ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.