Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
List more of the doc improvements, list some of the best diffs in
[rsync/rsync.git]
/
clientserver.c
diff --git
a/clientserver.c
b/clientserver.c
index
978135d
..
27ace48
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-28,6
+28,7
@@
#include "rsync.h"
extern int verbose;
#include "rsync.h"
extern int verbose;
+extern int quiet;
extern int list_only;
extern int am_sender;
extern int am_server;
extern int list_only;
extern int am_sender;
extern int am_server;
@@
-45,10
+46,12
@@
extern int orig_umask;
extern int no_detach;
extern int default_af_hint;
extern char *bind_address;
extern int no_detach;
extern int default_af_hint;
extern char *bind_address;
-extern
struct filter_list_struct server_filter_list
;
+extern
char *sockopts
;
extern char *config_file;
extern char *files_from;
extern char *tmpdir;
extern char *config_file;
extern char *files_from;
extern char *tmpdir;
+extern struct chmod_mode_struct *chmod_modes;
+extern struct filter_list_struct server_filter_list;
char *auth_user;
int read_only = 0;
char *auth_user;
int read_only = 0;
@@
-98,6
+101,8
@@
int start_socket_client(char *host, char *path, int argc, char *argv[])
if (fd == -1)
exit_cleanup(RERR_SOCKETIO);
if (fd == -1)
exit_cleanup(RERR_SOCKETIO);
+ set_socket_options(fd, sockopts);
+
ret = start_inband_exchange(user, path, fd, fd, argc);
return ret ? ret : client_run(fd, fd, -1, argc, argv);
ret = start_inband_exchange(user, path, fd, fd, argc);
return ret ? ret : client_run(fd, fd, -1, argc, argv);
@@
-615,6
+620,7
@@
static int rsync_module(int f_in, int f_out, int i)
verbose = 0; /* future verbosity is controlled by client options */
ret = parse_arguments(&argc, (const char ***) &argv, 0);
verbose = 0; /* future verbosity is controlled by client options */
ret = parse_arguments(&argc, (const char ***) &argv, 0);
+ quiet = 0; /* Don't let someone try to be tricky. */
if (filesfrom_fd == 0)
filesfrom_fd = f_in;
if (filesfrom_fd == 0)
filesfrom_fd = f_in;
@@
-679,6
+685,16
@@
static int rsync_module(int f_in, int f_out, int i)
if (lp_timeout(i) && lp_timeout(i) > io_timeout)
set_io_timeout(lp_timeout(i));
if (lp_timeout(i) && lp_timeout(i) > io_timeout)
set_io_timeout(lp_timeout(i));
+
+ if (am_sender)
+ p = lp_outgoing_chmod(i);
+ else
+ p = lp_incoming_chmod(i);
+ if (*p && !parse_chmod(p, &chmod_modes)) {
+ rprintf(FLOG, "Invalid \"%sing chmod\" directive: %s\n",
+ am_sender ? "outgo" : "incom", p);
+ }
+
start_server(f_in, f_out, argc, argv);
return 0;
start_server(f_in, f_out, argc, argv);
return 0;
@@
-718,7
+734,10
@@
int start_daemon(int f_in, int f_out)
if (!am_server) {
set_socket_options(f_in, "SO_KEEPALIVE");
if (!am_server) {
set_socket_options(f_in, "SO_KEEPALIVE");
- set_socket_options(f_in, lp_socket_options());
+ if (sockopts)
+ set_socket_options(f_in, sockopts);
+ else
+ set_socket_options(f_in, lp_socket_options());
set_nonblocking(f_in);
}
set_nonblocking(f_in);
}
@@
-754,6
+773,10
@@
int start_daemon(int f_in, int f_out)
return -1;
if (!*line || strcmp(line, "#list") == 0) {
return -1;
if (!*line || strcmp(line, "#list") == 0) {
+ char *addr = client_addr(f_in);
+ char *host = client_name(f_in);
+ rprintf(FLOG, "module-list request from %s (%s)\n",
+ host, addr);
send_listing(f_out);
return -1;
}
send_listing(f_out);
return -1;
}