char *p;
if (argc == 0 && !am_sender)
- list_only = 1;
+ list_only |= 1;
if (*path == '/') {
rprintf(FERROR,
if (!user)
user = getenv("LOGNAME");
- /* set daemon_over_rsh to false since we need to build the
- * true set of args passed through the rsh/ssh connection;
- * this is a no-op for direct-socket-connection mode */
- daemon_over_rsh = 0;
- server_options(sargs, &sargc);
-
- sargs[sargc++] = ".";
-
- if (path && *path)
- sargs[sargc++] = path;
-
- sargs[sargc] = NULL;
-
io_printf(f_out, "@RSYNCD: %d\n", protocol_version);
if (!read_line(f_in, line, sizeof line - 1)) {
if (protocol_version > remote_protocol)
protocol_version = remote_protocol;
+ if (list_only && protocol_version >= 29)
+ list_only |= 2;
+
+ /* set daemon_over_rsh to false since we need to build the
+ * true set of args passed through the rsh/ssh connection;
+ * this is a no-op for direct-socket-connection mode */
+ daemon_over_rsh = 0;
+ server_options(sargs, &sargc);
+
+ sargs[sargc++] = ".";
+
+ if (path && *path)
+ sargs[sargc++] = path;
+
+ sargs[sargc] = NULL;
+
+ if (verbose > 1)
+ print_child_argv(sargs);
+
p = strchr(path,'/');
if (p) *p = 0;
io_printf(f_out, "%s\n", path);
if (rsync_port == 0 && (rsync_port = lp_rsync_port()) == 0)
rsync_port = RSYNC_PORT;
- if (bind_address == NULL)
+ if (bind_address == NULL && *lp_bind_address())
bind_address = lp_bind_address();
log_init();