Up to [local] / src / usr.bin / rsync
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.36 / (download) - annotate - [select for diffs], Mon Nov 27 11:28:39 2023 UTC (6 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
HEAD
Changes since 1.35: +2 -3 lines
Diff to previous 1.35 (colored) to selected 1.29 (colored)
The uploader tail shortcut to skip dir postprocessing should also check if ignore_dir_times is set. In that case preserve_times loses its meaning. OK tb@
Revision 1.35 / (download) - annotate - [select for diffs], Thu Nov 23 11:59:53 2023 UTC (6 months, 2 weeks ago) by job
Branch: MAIN
Changes since 1.34: +15 -13 lines
Diff to previous 1.34 (colored) to selected 1.29 (colored)
Add --omit-dir-times / -O OK claudio@
Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 28 10:24:39 2023 UTC (13 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE,
OPENBSD_7_4
Changes since 1.33: +13 -5 lines
Diff to previous 1.33 (colored) to selected 1.29 (colored)
Implement --size-only and --ignore-times Flags are passed to the remote system but --size-only is only set if local system is sender since this is the behaviour of rsync. Initial diff from Martin Cracauer but mostly reimplemented and extended by myself. OK kn@
Revision 1.24.2.1 / (download) - annotate - [select for diffs], Tue Nov 9 13:41:24 2021 UTC (2 years, 7 months ago) by benno
Branch: OPENBSD_6_9
Changes since 1.24: +189 -119 lines
Diff to previous 1.24 (colored) next main 1.25 (colored) to selected 1.29 (colored)
rpki-client(8) should handle CA misbehaviours as soft-errors. This is a merge of usr.sbin/rpki-client and usr.bin/rsync from current and includes all commits in rpki-client 7.5 up to Tue Nov 9 11:03:40 2021 and to openrsync up to Wed Nov 3 14:42:13 2021, including: * Make rpki-client more resilient regarding untrusted input: - fail repository synchronisation after 15min runtime - limit the number of publication points per TAL - don't allow DOCTYPE definitions in RRDP XML files - fix detection of HTTP redirect loops. * limit the number of concurrent rsync processes. * fix CRLF in tal files. This is patches/6.9/common/021_rpki.patch.sig
Revision 1.29.2.1 / (download) - annotate - [select for diffs], Tue Nov 9 13:40:41 2021 UTC (2 years, 7 months ago) by benno
Branch: OPENBSD_7_0
Changes since 1.29: +116 -37 lines
Diff to previous 1.29 (colored) next main 1.30 (colored)
rpki-client(8) should handle CA misbehaviours as soft-errors. This is a merge of usr.sbin/rpki-client and usr.bin/rsync from current and includes all commits in rpki-client 7.5 up to Tue Nov 9 11:03:40 2021 and to openrsync up to Wed Nov 3 14:42:13 2021, including: * Make rpki-client more resilient regarding untrusted input: - fail repository synchronisation after 15min runtime - limit the number of publication points per TAL - don't allow DOCTYPE definitions in RRDP XML files - fix detection of HTTP redirect loops. * limit the number of concurrent rsync processes. * fix CRLF in tal files. This is patches/7.0/common/004_rpki.patch.sig
Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 3 14:42:12 2021 UTC (2 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3,
OPENBSD_7_2_BASE,
OPENBSD_7_2,
OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.32: +10 -10 lines
Diff to previous 1.32 (colored) to selected 1.29 (colored)
whitespace observed during a read-through
Revision 1.32 / (download) - annotate - [select for diffs], Fri Oct 29 08:00:59 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.31: +10 -1 lines
Diff to previous 1.31 (colored) to selected 1.29 (colored)
Properly implement --max-size and --min-size. This uses scan_scaled(3) from libutil which is very similar to how rsync behaves. Not implemented are the +/-1 math and the 1000 vs 1024 multipliers. OK benno@ job@
Revision 1.31 / (download) - annotate - [select for diffs], Sun Oct 24 21:24:17 2021 UTC (2 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored) to selected 1.29 (colored)
For open/openat, if the flags parameter does not contain O_CREAT, the 3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 22 11:10:34 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.29: +98 -28 lines
Diff to previous 1.29 (colored)
Implement --compare-dest in openrsync. compare-dest allows you to add additional directories to check for files to be available. OK benno@
Revision 1.29 / (download) - annotate - [selected], Wed Jun 30 13:10:04 2021 UTC (2 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE
Branch point for: OPENBSD_7_0
Changes since 1.28: +1 -1 lines
Diff to previous 1.28 (colored)
Replace Id: tags with OpenBSD: tags OK deraadt@
Revision 1.28 / (download) - annotate - [select for diffs], Mon May 17 12:15:48 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.27: +22 -15 lines
Diff to previous 1.27 (colored) to selected 1.29 (colored)
Reshuffle if conditions to check for error first after the fstat() calls. OK benno@
Revision 1.27 / (download) - annotate - [select for diffs], Mon May 17 12:11:05 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.26: +4 -1 lines
Diff to previous 1.26 (colored) to selected 1.29 (colored)
Do not leak blk.blks in error condition. Noticed by and OK benno@
Revision 1.26 / (download) - annotate - [select for diffs], Mon May 17 11:49:01 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.25: +26 -34 lines
Diff to previous 1.25 (colored) to selected 1.29 (colored)
The openat() then fstat() pattern only works if one is sure the file being opened is a regular file. In other cases this may block in openat() (since the O_NONBLOCK flag removed). Switch to fstatat() and then openat() to protect from involuntary side-effects (like opening a device node) and possible hangs. OK benno@
Revision 1.25 / (download) - annotate - [select for diffs], Thu May 6 07:35:22 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.24: +70 -81 lines
Diff to previous 1.24 (colored) to selected 1.29 (colored)
Simplify file handling. There is no reason to use O_NONBLOCK on regular files since they will never "block". Remove the UPLOAD_READ_LOCAL state and inline the meta data check into pre_file(). Plug one memory leak and cleanup code a bunch. OK benno@
Revision 1.24 / (download) - annotate - [select for diffs], Mon Mar 22 11:20:04 2021 UTC (3 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE
Branch point for: OPENBSD_6_9
Changes since 1.23: +2 -5 lines
Diff to previous 1.23 (colored) to selected 1.29 (colored)
Put comment where it belongs also remove an assert() that checks for an impossible condition. The map argument is from a pread() call and can never be MAP_FAILED. From kristaps@
Revision 1.23 / (download) - annotate - [select for diffs], Mon Aug 26 22:22:14 2019 UTC (4 years, 9 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7,
OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.22: +32 -20 lines
Diff to previous 1.22 (colored) to selected 1.29 (colored)
replace a mmap() with pread(). The mmap() is not needed, the file is read sequentially anyway, (hash-sized) block by block. This avoids counting potentially large files against the memory limits of the process. Problem reported by Jan Stary, thanks. ok deraadt@
Revision 1.22 / (download) - annotate - [select for diffs], Wed May 8 21:30:11 2019 UTC (5 years, 1 month ago) by benno
Branch: MAIN
Changes since 1.21: +15 -19 lines
Diff to previous 1.21 (colored) to selected 1.29 (colored)
remove sess argument from all functions that only used it for logging functions. ok deraadt@
Revision 1.21 / (download) - annotate - [select for diffs], Wed May 8 20:00:25 2019 UTC (5 years, 1 month ago) by benno
Branch: MAIN
Changes since 1.20: +62 -62 lines
Diff to previous 1.20 (colored) to selected 1.29 (colored)
remove sess argument from log functions. ok deraadt@
Revision 1.20 / (download) - annotate - [select for diffs], Tue Apr 2 11:05:55 2019 UTC (5 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.19: +3 -4 lines
Diff to previous 1.19 (colored) to selected 1.29 (colored)
annoying white space
Revision 1.19 / (download) - annotate - [select for diffs], Sat Mar 23 16:04:28 2019 UTC (5 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +5 -7 lines
Diff to previous 1.18 (colored) to selected 1.29 (colored)
indents and reflows around ERR*() and LOG*(); ok benno
Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 18 15:33:21 2019 UTC (5 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) to selected 1.29 (colored)
repair a few more yoda compares
Revision 1.17 / (download) - annotate - [select for diffs], Mon Feb 18 22:47:34 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.16: +105 -71 lines
Diff to previous 1.16 (colored) to selected 1.29 (colored)
new attempt to 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@.
Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 18 21:55:27 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.15: +71 -105 lines
Diff to previous 1.15 (colored) to selected 1.29 (colored)
revert previous
Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 18 21:34:54 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.14: +105 -71 lines
Diff to previous 1.14 (colored) to selected 1.29 (colored)
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@.
Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 17 16:34:04 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored) to selected 1.29 (colored)
more yoda repairs
Revision 1.13 / (download) - annotate - [select for diffs], Sat Feb 16 16:56:33 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.12: +1 -2 lines
Diff to previous 1.12 (colored) to selected 1.29 (colored)
sync with kristaps, commit ad6f9d84aa041d28b93cdf885a583a09f58b1b88 Remove superfluous includes.
Revision 1.12 / (download) - annotate - [select for diffs], Sat Feb 16 10:49:37 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored) to selected 1.29 (colored)
I did some work here.
Revision 1.11 / (download) - annotate - [select for diffs], Sat Feb 16 10:48:05 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.10: +240 -48 lines
Diff to previous 1.10 (colored) to selected 1.29 (colored)
implement -D and in turn -a "you snooze, you get collisions" deraadt@
Revision 1.10 / (download) - annotate - [select for diffs], Sat Feb 16 10:47:20 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.9: +1 -4 lines
Diff to previous 1.9 (colored) to selected 1.29 (colored)
Handle file permissions in rsync_set_metadata(). We set permissions either when we create a new file or when the -p flag is set. "you snooze, you get collisions" deraadt@
Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 16 10:46:22 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.8: +63 -38 lines
Diff to previous 1.8 (colored) to selected 1.29 (colored)
Introduce mkstempat(), a variation on mkstemp(3) and mkstemplinkat(). 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@
Revision 1.8 / (download) - annotate - [select for diffs], Sat Feb 16 05:30:28 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +5 -3 lines
Diff to previous 1.7 (colored) to selected 1.29 (colored)
use gettimeofday + TIMEVAL_TO_TIMESPEC to create timespec with better than 1 sec resolution ok benno
Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 16 05:06:30 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +5 -9 lines
Diff to previous 1.6 (colored) to selected 1.29 (colored)
unwrap lines which do not need wrapping
Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 14 18:31:01 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.5: +6 -2 lines
Diff to previous 1.5 (colored) to selected 1.29 (colored)
sync with kristaps, commit 71065b31649480ceb1ee6942232d673bf8ab70c8 Enable -o.
Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 14 18:29:08 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.4: +24 -13 lines
Diff to previous 1.4 (colored) to selected 1.29 (colored)
sync with kristaps, commit be8a27a290d5171290c015284542f2af4296be12 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.
Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 11 21:41:22 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +48 -48 lines
Diff to previous 1.3 (colored) to selected 1.29 (colored)
swap comparison arguments as needed, to match idiomatic C most of us are familiar with. Proofed by florian and benno
Revision 1.3 / (download) - annotate - [select for diffs], Mon Feb 11 19:18:36 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +15 -15 lines
Diff to previous 1.2 (colored) to selected 1.29 (colored)
cleanup weird spaces around !. (We normalize source-code to a standard idiom because it is less error prone for a larger team. kristaps idiom is highly divergent) ok benno
Revision 1.2 / (download) - annotate - [select for diffs], Sun Feb 10 23:24:14 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.1: +25 -25 lines
Diff to previous 1.1 (colored) to selected 1.29 (colored)
fix whitespace
Revision 1.1 / (download) - annotate - [select for diffs], Sun Feb 10 23:18:28 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Diff to selected 1.29 (colored)
Import Kristaps' openrsync into the tree. OK deraadt@