+ rprintf(FERROR,
+ "ERROR: The remote path must start with a module name\n");
+ return -1;
+ }
+
+ if (!user)
+ user = getenv("USER");
+ if (!user)
+ user = getenv("LOGNAME");
+
+ io_printf(f_out, "@RSYNCD: %d\n", protocol_version);
+
+ if (!read_line(f_in, line, sizeof line - 1)) {
+ rprintf(FERROR, "rsync: did not see server greeting\n");
+ return -1;
+ }
+
+ if (sscanf(line,"@RSYNCD: %d", &remote_protocol) != 1) {
+ /* note that read_line strips of \n or \r */
+ rprintf(FERROR, "rsync: server sent \"%s\" rather than greeting\n",
+ line);