summaryrefslogtreecommitdiff
path: root/usr.bin/rsync
AgeCommit message (Collapse)Author
2023-04-28Implement --size-only and --ignore-timesClaudio Jeker
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@
2023-04-27sort options;Jason McIntyre
2023-04-27Implement -V as an alias to --version.Claudio Jeker
From Martin Cracauer OK kn@
2023-04-12Fix 24bit maximum/mask in manpage. Noticed by wangqr on github.Claudio Jeker
2023-02-14Fix handling of port numbers in rsync://host[:port]/module URLsJob Snijders
With and OK tb@
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
amendments to his diff are noted on tech
2022-08-02Add missing closing bracket in usageTheo Buehler
2022-08-02Add --contimeout functionality.Job Snijders
Input from deraadt@ OK claudio@
2022-04-12Do not convert the int value twice from little to host endian.Claudio Jeker
io_read_int() already does the conversion so don't double up in io_read_ulong(). Fixes openrsync on sparc64. OK miod@ deraadt@
2022-01-12seperators -> separatorsTheo Buehler
2021-12-28In io_write_buf() adjust the calculation of the multiplex message sizeClaudio Jeker
so that the loop works even for buffers bigger than 0xffffff. The code does not produce such big buffers but better make the code correct. Reported by Blago Dachev (blago (at) dachev (dot) com) OK benno@
2021-11-28Stop using MAXBSIZE to eliminate sys/param.h including (which injects aTheo de Raadt
ton of namespace intrusion). Create local sizes, and refactor some code along the way. ok millert
2021-11-26followng -> followingJonathan Gray
2021-11-26definiton -> definitionJonathan Gray
2021-11-03whitespace observed during a read-throughTheo de Raadt
2021-11-03Add missing copyright statement. Reminded by deraadt@Claudio Jeker
2021-10-29Properly implement --max-size and --min-size.Claudio Jeker
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@
2021-10-28Provide --max-size and --min-size arguments. Currently ignored butClaudio Jeker
rpki-client wants --max-size and this will unblock that work. With job@
2021-10-24For open/openat, if the flags parameter does not contain O_CREAT, theTheo de Raadt
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
2021-10-22add some punctuation;Jason McIntyre
2021-10-22Implement --compare-dest in openrsync. compare-dest allows you to addClaudio Jeker
additional directories to check for files to be available. OK benno@
2021-10-22When reading the symlink value during the fts travers use ent->fts_accpathClaudio Jeker
since the fts traverse does chdirs for performance reasons. OK deraadt@
2021-09-02remove sys/param.h that snuck in, by replacing MAXPATHLEN with PATH_MAXTheo de Raadt
2021-09-01Remove from0 support. openrsync will not implement all bad ideas thatClaudio Jeker
were added to rsync. from0 is one of those and really not needed. OK job@
2021-08-30Document new include*/exclude* options in the man pageJob Snijders
2021-08-30Add include/exclude to usage()Job Snijders
OK claudio@
2021-08-29This needs extern.h for the rmatch prototypeClaudio Jeker
2021-08-29Implement --exclude/exclude-file and --include/include-file.Claudio Jeker
Currently only simple include and excludes work, the advanced filters introduced later in rsync are not implemented. It is unclear if the per directory filters are something we want to implement. This requires more modern protocols which openrsync is not able to handle right now. This adds a special matching function to allow the ** matching which behaves mostly like rsyncs version with the exception of how bad [] patterns are expanded. For bad patterns openrsync follows more how fnmatch behaves and not the somewhat strange rsync behaviour. Not perfect but committing now so people can test and provide feedback.
2021-07-14Restructure the getopt_long options. Sort them mostly by name with theClaudio Jeker
exception of no-xyz options that are grouped with the coresponding xyz option. Fix --no-motd to use the internal flag setting of getopt_long. Also use some defines instead of numbers for pure long options that need special handling. OK benno@
2021-06-30... way too much white space!Claudio Jeker
2021-06-30Remove TODO.md, this file is not up-to-date and also not really a goodClaudio Jeker
todo list for rsync.
2021-06-30Replace Id: tags with OpenBSD: tagsClaudio Jeker
OK deraadt@
2021-05-17Reshuffle if conditions to check for error first after the fstat() calls.Claudio Jeker
OK benno@
2021-05-17Do not leak blk.blks in error condition.Claudio Jeker
Noticed by and OK benno@
2021-05-17Adjust exit codes in the main program to follow the ones from rsync.Claudio Jeker
OK benno@
2021-05-17Error out on memory failures in fargs_cmdline() and addargs() in bothClaudio Jeker
cases it was impossible to start the remote rsync anyway. Also now fargs_cmdline() can no longer fail. Add missing err(ERR_IPC, "pldege") for the cases in socket.c OK benno@
2021-05-17If pledge() or unveil() fails error out with ERR_IPC. Also error out inClaudio Jeker
the receiver when intial setup fails because of filesystem errors (unable to open or create the base directory) or on memory failures. OK benno@
2021-05-17Introduce some error exit codes which are in sync with the ones fromClaudio Jeker
proper rsync. This should help to make the tool behave more like the real thing. OK benno@
2021-05-17Sync code with the original from mkdir(1).Claudio Jeker
OK benno@
2021-05-17The openat() then fstat() pattern only works if one is sure the file beingClaudio Jeker
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@
2021-05-06Simplify file handling. There is no reason to use O_NONBLOCK on regularClaudio Jeker
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@
2021-05-06More code cleanupClaudio Jeker
OK florian@ benno@
2021-04-05minor KNFTheo de Raadt
2021-03-31add --no-motd to SYNOPSIS;Jason McIntyre
2021-03-31Add option to suppress the Message of the Dayjob
Fine deraadt@
2021-03-22Remove unveil() from the rsync_sender() and flist_gen(). The sender isClaudio Jeker
not able to properly unveil itself because you can request many files as arguments. At the same time the sender is read-only and uses rpath pledge() so the gain from unveil() is less of an issue. On the receiver side all files land in one directory and this part still uses unveil() to protect rsync to somehow walk out of the destination directory. From kristaps@
2021-03-22Adjust function name in error strings.Claudio Jeker
From kristaps@
2021-03-22Adjust a type to unsigned since the io function works on unsigned ints.Claudio Jeker
Also the id is a strictly positve integer so this make sense. Cleanup comments and a spacing while there. From kristaps@
2021-03-22Put comment where it belongs also remove an assert() that checks for anClaudio Jeker
impossible condition. The map argument is from a pread() call and can never be MAP_FAILED. From kristaps@
2021-03-22Compare explicitly against NULL.Claudio Jeker
From kristaps@