summaryrefslogtreecommitdiffstats
path: root/usr.bin/rsync/extern.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add option to suppress the Message of the Dayjob2021-03-311-1/+2
| | | | Fine deraadt@
* Make fmt argument const. Format local vars a bit.claudio2021-03-221-2/+2
| | | | From kristaps@
* Simple implementation of --timeout to exit after specified seconds of I/Oclaudio2020-11-241-3/+3
| | | | | | inactivity. By default rsync will wait forever but this results in stuck processes if the remote side does not answer properly as seen in rpki-client. OK job@ benno@
* __FILE__ and __LINE__ information are fine during early development, orderaadt2020-05-171-28/+28
| | | | | | occasionally for fatal source-code bugs are critical and must be hunted down. It is NOT suitable to expose regular users to this on a regular basis though. ok kn beck
* Add --address argument to openrsync to bind to the specified addressclaudio2019-08-091-1/+2
| | | | | when connecting to a rsync daemon. OK deraadt@ benno@ naddy@ sthen@
* Use a simple hash table to look up blocks by the fast-hash. Also useflorian2019-06-021-1/+8
| | | | | | a rolling computation for the fast-hash.OB With this openrsync is on par with gpl rsync for file updates. From kristaps
* remove sess argument from all functions that only used it for loggingbenno2019-05-081-20/+14
| | | | | functions. ok deraadt@
* remove sess argument from log functions. ok deraadt@benno2019-05-081-46/+40
|
* Add support for not crossing filesystem boundaries (-x) to rsync. Optionbket2019-04-041-1/+2
| | | | | | | | | and behaviour is the same as GPL rsync. Initial diff received feedback from benno@, schwarze@, deraadt@ and florian@. Thanks! OK deraadt@
* Pull in addargs() API from ssh to replace complicated hand-rolled argumentderaadt2019-04-021-1/+11
| | | | | composition code for the remote process. ok florian naddy
* Increasing strictness regarding signed-vs-unsigned types and their rangederaadt2019-03-311-1/+4
| | | | | in the io-path, whic is done by seperating int vs uint functions variants. reviewed by naddy, florian, and jsg
* Add ability to combine rsync:// and -e by splitting rsync_socket()naddy2019-03-311-3/+5
| | | | | | | | | | | into two functions, rsync_connect() to establish a TCP connection to the remote daemon, and rsync_socket() to run the actual protocol. E.g.: rsync -av --del -e 'ssh -W localhost:rsync -lanoncvs' \ rsync://anoncvs.spacehopper.org/OpenBSD-CVS/ /cvs ok deraadt@
* Simplify startup code, various phases are heading straight towards exitderaadt2019-03-061-3/+1
| | | | | so they don't need to be constructed to return errors. ok benno florian
* remove __BEGIN_DECLS/__END_DECLS, this .h file wont bebenno2019-02-221-5/+1
| | | | | | read by a C++ compiler, and __* are no lonmger recommended. https://www.gnu.org/software/libtool/manual/html_node/C-header-files.html ok deraadt@
* implement --numeric-ids, tweaked by kristapsbenno2019-02-211-1/+2
|
* new attempt to sync with kristaps up to Sun Feb 17 2019benno2019-02-181-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@.
* revert previousbenno2019-02-181-12/+6
|
* sync with kristaps up to Sun Feb 17 2019benno2019-02-181-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@.
* Add support for --port=PORT and ":port" in the rsync:// URL.deraadt2019-02-171-1/+2
| | | | | real rsync only supports numbers, but this supports service names also ok florian benno
* use MINIMUM() instead of MIN() as elsewhere in the treederaadt2019-02-161-4/+2
|
* nasty ugly invisible spacesderaadt2019-02-161-2/+2
|
* sync with kristaps, commit 42166a639caa877efd91e73e288b89abf6b7cfd3florian2019-02-161-2/+2
| | | | Remove spaces at end of line.
* sync with kristaps, commit 1842d31d600f2834ae78fe0d99a29519a853d75cflorian2019-02-161-10/+38
| | | | | | Make sender mostly nonblocking for writes. This takes a lot of logic once in blocks.c and puts it directly into sender.c. It allows running openrsync against itself without deadlocks.
* sync with kristaps, commit f5c1e234990877cd274b7bcdd4d9883104cd1568florian2019-02-161-7/+18
| | | | | | Make sender have reentrant sending and prioritised reading. This way, the sender gets data off the wire as quickly as possible. While here, remove dead wood from blocks.c (blk_merge).
* implement -D and in turn -aflorian2019-02-161-8/+16
| | | | "you snooze, you get collisions" deraadt@
* Introduce mkstempat(), a variation on mkstemp(3) and mkstemplinkat().florian2019-02-161-1/+5
| | | | | | | | | | | | | | | mkstempat() works exactly like mkstemp(3) except that it replaces open(2) with openat(2) so that it can be used in rsync_downloader() to easily deal with relative paths. mkstemplinkat() works somewhat like mkdtemp() to create a template symlink. Use the mkstemplinkat() to create or update symlinks and overwrite existing objects including empty directories that might exist under the destination name. "you snooze, you get collisions" deraadt@
* sync with kristaps, commit be8a27a290d5171290c015284542f2af4296be12florian2019-02-141-1/+3
| | | | | Put permission-setting code into its own function, as we'll need to call it from several places. Also enable that -o sets the owner.
* sync with kristaps, commit c5350b9055c3921001778275bb808a5c811c21c1florian2019-02-141-6/+9
| | | | | | | Protocol-level support for -o. The actual sharing itself is more or less a copy of the existing -g code. I've refactored a lot of the ids.c code to be generic and only accept a "isgid", as the rest is the same. So there's some churn as I make all references to "group" be generic.
* whitespace and knfbenno2019-02-121-3/+4
|
* syncbenno2019-02-121-2/+4
| | | | | | | | | | | commit 72ea211d57a0f235a2d7439a7e908af66f47fa10 Author: kristaps <> Date: Tue Feb 12 07:29:55 2019 +0000 Sanitise group handling to handle group wheel (according to rsync, this is not ever remapped by name) and empty group names (not allowed, but we must accept them anyway). Push most of this code into ids.c and make sure it is style(9) conformant. Add TODO about performance and clarify protocol in rsync.5.
* syncbenno2019-02-121-1/+16
| | | | | | | | commit bc997c5d70dbe402903c7ce0c915c7fe3744a754 Author: kristaps <> Date: Mon Feb 11 23:37:41 2019 +0000 Move identifier code into ids.c.
* syncbenno2019-02-121-1/+2
| | | | | | | | | | | | | | commit b55c5ce631d8fd557d665e25e31191b33c15f829 Author: kristaps <> Date: Mon Feb 11 23:27:23 2019 +0000 Pass down -g and also order flags. and the extern.h chunk from commit 472ad2fab2692579a5773d78d6934b03c1098fb2 Author: kristaps <> Date: Mon Feb 11 20:45:22 2019 +0000
* complete support for -e and -rsh=name optionsderaadt2019-02-121-1/+2
| | | | ok florian benno
* using const is misleading if the only access requires a de-const, it isderaadt2019-02-121-11/+11
| | | | | a false perception of safety ok benno florian
* fix whitespacebenno2019-02-101-10/+10
|
* Import Kristaps' openrsync into the tree.benno2019-02-101-0/+295
OK deraadt@