Return to rsyncd.5 CVS log | Up to [local] / src / usr.bin / rsync |
File: [local] / src / usr.bin / rsync / rsyncd.5 (download)
Revision 1.3, Mon Feb 18 21:34:54 2019 UTC (5 years, 3 months ago) by benno
sync with kristaps up to Sun Feb 17 2019 339cf5998c0c022623cd68de50722b6c14543952 Push "error trail" further into code. baf58ce5fe1bc6ce431b3b0ac8264b83ae8c7d02 Document all arguments. Add common -av usage. Remove bits about not supporting anything but files/dirs. 821a811a8c80e52fb56b241fc65a16cae1b4fb2c Disambiguate as prodded by deraadt@ 6c4475b8f226e9031ec0ec1b3f14f7d347132c87 Add -h to usage string 4d344ae6156873b44c95de0c1ed629e637c2d7ab Clarify error message language, use service name instead of port, specify that the socket is SOCK_STREAM. From deraadt@. Tweaked for lowercase messages. f3ec049e76257fc96bcdc872f1d3b967b98f3eb6 In consideration to benno@'s comments, let the mktemp functions propogate an errno handled by the caller. Also keep the original line lengths. While in mktemp.c, make some defines into an enum. e116c2bd00e634b56e4276120135915ceaa31cf2 Put the FSM of the sender into its own function. Put dry_run ack and end of phase ack into the send buffer too, further reducing the possibility of deadlock. c7745aa4c7394ca89d841f8ee76782256d694340 Make the sender write loop be fully non-blocking. This frees us of deadlocking the protocol because the sender will always be able to pull down data. 93c7b4843e80aeac2ec6ae6ffc395df4deaf4a31 Remove "yoda" notation to be more in tune with OpenBSD. Most found by deraadt@. |
.\" $OpenBSD: rsyncd.5,v 1.3 2019/02/18 21:34:54 benno Exp $ .\" .\" Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: February 18 2019 $ .Dt RSYNCD 5 .Os .Sh NAME .Nm rsyncd .Nd rsyncd wire protocol .Sh DESCRIPTION The .Nm protocol described in this relates to the BSD-licensed .Xr openrsync 1 , a re-implementation of the GPL-licensed reference utility .Xr rsync 1 . It is compatible with version 27 of the reference. .Pp The .Nm protocol is an envelope protocol for .Xr rsync 5 between a client and an rsync://-capable server. It provides a means to exchange capabilities information prior to file transfer. .Pp In this document, .Qq client refers to the .Xr openrsync 1 utility making the request. It follows that .Qq server refers to the daemon servicing the request. .Pp A connection between a client and server consists of host, a module, and zero or more paths. .Pp .Dl openrsync rsync://host/module/path1 rsync://host/path2... dest .Pp At this time, operating in sender mode (with the rsync:// host receiving information) is not described in this document. .Ss Data types These are the same as in .Xr rsync 5 . A newline is always a standalone \en. .Ss Client process After initialising a connection, the client and server exchange the following information, in order. This portion of the process is .Em not multiplexed. .Pp .Bl -enum -compact .It client sends requested module followed by newline .It server responds with preamble followed by standalone newline .El .Pp The requested module must have non-zero length. The preamble consists in a sequence of lines. Each line either contains free-form text sent by the server as a .Qq motd .Pq message of the day or a command: .Pp .Dl @RSYNCD: command\en .Pp The only supported command is the server protocol specification: .Pp .Dl @RSYNCD: xx[.yy]\en .Pp The optional component is the submodule, which may be discarded. The version may only be specified once. Both the motd and commands end in the special termination command: .Pp .Dl @RSYNCD: OK\en .Pp Following that, the client must send the command-line arguments that would otherwise be used to start a .Xr openrsync 1 server. Each argument must be specified on its own line, e.g., .Pp .Dl --server\en--sender\en-r\en-t\en.\enpath1\enpath2 .Pp This must be followed by a standalone newline. .Pp If the server does not understand or accept any of the command-line arguments, it will exit at this point. .Pp Following this, the client must read the integer-length session checksum seed. Multiplexing is subsequently enabled. .Pp The sequence that follows is stipulated in .Xr rsync 5 following the handshake. .\" The following requests should be uncommented and used where appropriate. .\" .Sh CONTEXT .\" For section 9 functions only. .\" .Sh RETURN VALUES .\" For sections 2, 3, and 9 function return values only. .\" .Sh ENVIRONMENT .\" For sections 1, 6, 7, and 8 only. .\" .Sh FILES .\" .Sh EXIT STATUS .\" For sections 1, 6, and 8 only. .\" .Sh EXAMPLES .\" .Sh DIAGNOSTICS .\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only. .\" .Sh ERRORS .\" For sections 2, 3, 4, and 9 errno settings only. .Sh SEE ALSO .Xr openrsync 1 , .Xr rsync 5 .\" .Sh STANDARDS .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh CAVEATS .\" .Sh BUGS