X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/aaccaa887d486b6f1c73046e67afccf4e7985560..8840ec0f49157bc390b3dda5467287a0290ac4f1:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 3b1567bf..3b53958f 100644 --- a/clientserver.c +++ b/clientserver.c @@ -28,6 +28,7 @@ #include "rsync.h" extern int verbose; +extern int quiet; extern int list_only; extern int am_sender; extern int am_server; @@ -57,6 +58,7 @@ int read_only = 0; int daemon_log_format_has_i = 0; int daemon_log_format_has_o_or_i = 0; int module_id = -1; +struct chmod_mode_struct *daemon_chmod_modes; /* Length of lp_path() string when in daemon mode & not chrooted, else 0. */ unsigned int module_dirlen = 0; @@ -619,6 +621,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); + quiet = 0; /* Don't let someone try to be tricky. */ if (filesfrom_fd == 0) filesfrom_fd = f_in; @@ -683,12 +686,11 @@ 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 (am_sender) p = lp_outgoing_chmod(i); else p = lp_incoming_chmod(i); - if (*p && !parse_chmod(p, &chmod_modes)) { + if (*p && !(daemon_chmod_modes = parse_chmod(p, &chmod_modes))) { rprintf(FLOG, "Invalid \"%sing chmod\" directive: %s\n", am_sender ? "outgo" : "incom", p); } @@ -771,6 +773,10 @@ int start_daemon(int f_in, int f_out) 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; }