summaryrefslogtreecommitdiff
path: root/usr.bin/rsync
AgeCommit message (Collapse)Author
2019-02-21implement --numeric-ids, tweaked by kristapsSebastian Benoit
2019-02-18new attempt to sync with kristaps up to Sun Feb 17 2019Sebastian Benoit
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@.
2019-02-18revert previousSebastian Benoit
2019-02-18sync with kristaps up to Sun Feb 17 2019Sebastian Benoit
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@.
2019-02-17delete bogus commentTheo de Raadt
2019-02-17Add support for --port=PORT and ":port" in the rsync:// URL.Theo de Raadt
real rsync only supports numbers, but this supports service names also ok florian benno
2019-02-17rsync has a large number of failure exit codes, so don't get used to thisTheo de Raadt
weak sauce EXIT_SUCCESS / EXIT_FAILURE model (in our tree very few programs use this failed concept, almost as bad as sysexits.h)
2019-02-17more yoda repairsTheo de Raadt
2019-02-17cleanup protocl warning, and return exit code upwards.Theo de Raadt
2019-02-17percolate exit code from deeper code, so that values other than 1 areTheo de Raadt
possible on failure. looked at by florian
2019-02-17improve option argument demonstrationTheo de Raadt
ok florian
2019-02-17Has to be SOCK_STREAM obviouslyTheo de Raadt
2019-02-16use MINIMUM() instead of MIN() as elsewhere in the treeTheo de Raadt
2019-02-16nasty ugly invisible spacesTheo de Raadt
2019-02-16Document some long optionsTheo de Raadt
2019-02-16--archive is same as -aTheo de Raadt
2019-02-16document -a, -D, --devices and --specialsFlorian Obser
2019-02-16add --help optionTheo de Raadt
2019-02-16document --versionTheo de Raadt
2019-02-16add missing -no-OPT long optionsTheo de Raadt
ok florian
2019-02-16sync with kristaps, commit 42166a639caa877efd91e73e288b89abf6b7cfd3Florian Obser
Remove spaces at end of line.
2019-02-16sync with kristaps, commit 1842d31d600f2834ae78fe0d99a29519a853d75cFlorian Obser
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.
2019-02-16sync with kristaps, commit d01f1b87a06c25353de28a9df45b3e202614b336Florian Obser
Add the lowbuffer routines. I'll use this in subsequent commits, but they pre-add the multiplexing frame instead of doing so during write. While here, clean up a lot of ERRX -> ERRX1 and add documentation.
2019-02-16sync with kristaps, commit d7c4fb8ac88845aa08900d5d0ec469257f63a339Florian Obser
Use a static single block instead of multiple writes.
2019-02-16sync with kristaps, commit f5c1e234990877cd274b7bcdd4d9883104cd1568Florian Obser
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).
2019-02-16sync with kristaps, commit ad6f9d84aa041d28b93cdf885a583a09f58b1b88Florian Obser
Remove superfluous includes.
2019-02-16sync with kristaps, commit 9b79b4a3d06c810304321d5b58544751b5d9fefdFlorian Obser
Fast-track reads back into a read loop to avoid the buffer with writes while there are still reads pending. This resolve some bottlenecking.
2019-02-16use service "rsync" rather than "873"Theo de Raadt
2019-02-16getaddrinfo doesn't imply "DNS", borrow terminology from sshTheo de Raadt
ok benno
2019-02-16-D bits, from kristapsFlorian Obser
2019-02-16We need to send/receive the rdev after gid and before symlink.Florian Obser
From kristaps, thanks!
2019-02-16I did some work here.Florian Obser
2019-02-16implement -D and in turn -aFlorian Obser
"you snooze, you get collisions" deraadt@
2019-02-16Handle file permissions in rsync_set_metadata().Florian Obser
We set permissions either when we create a new file or when the -p flag is set. "you snooze, you get collisions" deraadt@
2019-02-16Introduce mkstempat(), a variation on mkstemp(3) and mkstemplinkat().Florian Obser
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@
2019-02-16Add chown pledge so that root can gift files to other uids.Florian Obser
"you snooze, you get collisions" deraadt@
2019-02-16a minimal --version long-option, so someone can unconfuse themselvesTheo de Raadt
2019-02-16use gettimeofday + TIMEVAL_TO_TIMESPEC to create timespec with betterTheo de Raadt
than 1 sec resolution ok benno
2019-02-16If anyone ports this to 6.4 they'll just comment out unveil, don't wasteTheo de Raadt
lines telling them.
2019-02-16unwrap lines which do not need wrappingTheo de Raadt
2019-02-14sync with kristaps, commit 438c1948c76a1ecd94e53e09ba88ec7e93004540Florian Obser
Put back stray -o passed into child and add missing pledge.
2019-02-14sync with kristaps, commit 69f69c7c7c950d42e02666ac63e3b98ec9c972ecFlorian Obser
Document the -e splice, bring long line, put variable at top of function block.
2019-02-14sync with kristaps, commit 71065b31649480ceb1ee6942232d673bf8ab70c8Florian Obser
Enable -o.
2019-02-14sync with kristaps, commit 7d2b721bec7937a4a155ca0635750bcbaff76d02Florian Obser
Only preserve uids if we're root.
2019-02-14sync with kristaps, commit be8a27a290d5171290c015284542f2af4296be12Florian Obser
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.
2019-02-14sync with kristaps, commit ab90d923f89b06308190d9fe371c7663c077e2bdFlorian Obser
-o isn't finished yet...
2019-02-14sync with kristaps, commit f77ca97c9f2ee916ee7f551d7b37676c1bd06b55Florian Obser
Document preserving user ids.
2019-02-14sync with kristaps, commit c5350b9055c3921001778275bb808a5c811c21c1Florian Obser
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.
2019-02-13strsep the -e argument for execve; ok bennoTheo de Raadt
2019-02-13Use md4 from libcrypto instead of using a compatible re-implementation.Theo Buehler
ok benno, deraadt