Age | Commit message (Collapse) | Author |
|
|
|
It is in principle possible that blkhash_free() (which obviously frees
a struct blktab, sigh) is called with NULL. This would lead to a crash.
ok claudio
|
|
bset->blksz can be 0 here and how reallocarray() behaves is implementation
defined.
|
|
The well-named ERR() macro doesn't error out. Therefore an incorrect use
of reallocarray() is actually a leak that is easily overlooked. Do it the
right way by assigning to a temporary variable and preserve behavior by
freeing and NULL-ing.
ok claudio
|
|
Found by Martin Cracauer
"look right" tb@
|
|
partly checked by millert@
|
|
to be written this way. Makes the code more readable.
OK tb@
|
|
cases together since they are kind of the same.
OK tb@
|
|
Setup inits the context and adds the seed. The buf function simply adds
a block from the file to the hash. The final function calls MD4_Final()
to close the context and generate the hash.
This will help to remove the mmap in the sender and should result in a
more atomic view of the file since hash_file() is now called together
with the other hash_functions.
OK deraadt@ tb@
|
|
the string is consumed as well. Right now a string of 'dir1/' and a
pattern of 'dir/' will result in an infinite loop because matchsub()
would return success but then would not move forward.
Report and diff from Kyle Evans (kevans FreeBSD.org)
OK tb@
|
|
algorithm. Make sure the sender does not run ahead of itself and end
stalling in a read from network that never shows up. Instead ensure
that all queued data is pushed out before accepting new data.
Problem found by and fix developed with Kyle Evans (kevans freebsd.org)
OK tb@ deraadt@
|
|
rsync compares e.g. the first mtime against 0, if the mtime is the epoch
then rsync will skip this field and openrsync will choke when receiving it.
So if there is no first element but a FLIST_XYZ_SAME flag is use 0 as
value.
Problem noticed by job@
OK tb@ job@ and yoda@ for fixing the if statements
|
|
the -O, --omit-dir-times description.
OK tb@
|
|
done by job@.
OK tb@
|
|
if ignore_dir_times is set. In that case preserve_times loses its meaning.
OK tb@
|
|
rsync has these options and so should ours. These strange --no-XYZ
options are undocumented and are there just for compatibility.
OK tb@ job@
|
|
OK claudio@
|
|
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@
|
|
|
|
From Martin Cracauer
OK kn@
|
|
|
|
With and OK tb@
|
|
amendments to his diff are noted on tech
|
|
|
|
Input from deraadt@
OK claudio@
|
|
io_read_int() already does the conversion so don't double up in
io_read_ulong(). Fixes openrsync on sparc64.
OK miod@ deraadt@
|
|
|
|
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@
|
|
ton of namespace intrusion). Create local sizes, and refactor some code
along the way.
ok millert
|
|
|
|
|
|
|
|
|
|
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@
|
|
rpki-client wants --max-size and this will unblock that work.
With job@
|
|
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
|
|
|
|
additional directories to check for files to be available.
OK benno@
|
|
since the fts traverse does chdirs for performance reasons.
OK deraadt@
|
|
|
|
were added to rsync. from0 is one of those and really not needed.
OK job@
|
|
|
|
OK claudio@
|
|
|
|
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.
|
|
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@
|
|
|
|
todo list for rsync.
|
|
OK deraadt@
|
|
OK benno@
|