OpenBSD CVS

CVS log for src/usr.bin/rsync/flist.c


[BACK] Up to [local] / src / usr.bin / rsync

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.38 / (download) - annotate - [select for diffs], Wed Dec 27 17:22:25 2023 UTC (4 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.37: +14 -19 lines
Diff to previous 1.37 (colored)

Fix handling of skipped elements on the very first element transmitted.
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

Revision 1.37 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:02 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Tue Nov 9 13:41:24 2021 UTC (2 years, 6 months ago) by benno
Branch: OPENBSD_6_9
Changes since 1.31: +45 -10 lines
Diff to previous 1.31 (colored) next main 1.32 (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.34.2.1 / (download) - annotate - [select for diffs], Tue Nov 9 13:40:41 2021 UTC (2 years, 6 months ago) by benno
Branch: OPENBSD_7_0
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored) next main 1.35 (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.36 / (download) - annotate - [select for diffs], Wed Nov 3 14:42:12 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

whitespace observed during a read-through

Revision 1.35 / (download) - annotate - [select for diffs], Fri Oct 22 09:59:35 2021 UTC (2 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

When reading the symlink value during the fts travers use ent->fts_accpath
since the fts traverse does chdirs for performance reasons.
OK deraadt@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Sep 2 21:06:06 2021 UTC (2 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE
Branch point for: OPENBSD_7_0
Changes since 1.33: +5 -5 lines
Diff to previous 1.33 (colored)

remove sys/param.h that snuck in, by replacing MAXPATHLEN with PATH_MAX

Revision 1.33 / (download) - annotate - [select for diffs], Sun Aug 29 13:43:46 2021 UTC (2 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.32: +37 -2 lines
Diff to previous 1.32 (colored)

Implement --exclude/exclude-file and --include/include-file.
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.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 30 13:10:04 2021 UTC (2 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.31: +1 -1 lines
Diff to previous 1.31 (colored)

Replace Id: tags with OpenBSD: tags
OK deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Mon Mar 22 11:49:15 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE
Branch point for: OPENBSD_6_9
Changes since 1.30: +1 -21 lines
Diff to previous 1.30 (colored)

Remove unveil() from the rsync_sender() and flist_gen(). The sender is
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@

Revision 1.30 / (download) - annotate - [select for diffs], Mon Mar 22 11:26:44 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

Adjust function name in error strings.
From kristaps@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 27 18:03:37 2019 UTC (4 years, 10 months ago) by deraadt
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.28: +4 -4 lines
Diff to previous 1.28 (colored)

Some asprintf() calls were checked < 0, rather than the precise == -1.
ok millert nicm tb, etc

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jun 23 10:28:32 2019 UTC (4 years, 10 months ago) by benno
Branch: MAIN
Changes since 1.27: +11 -17 lines
Diff to previous 1.27 (colored)

fix free() on uninitialized pointer with -rx and same
suggestions and ok naddy@ and ok previois diff florian@.
from Hiltjo Posthuma hiltjo AT codemadness DOT org and
Bjoern Ketelaars bjorn DOT ketelaars AT hydroxide DOT nl,
Thanks.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jun 2 14:29:58 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

spelling; from Hiltjo Posthuma

Revision 1.26 / (download) - annotate - [select for diffs], Wed May 8 21:30:11 2019 UTC (5 years ago) by benno
Branch: MAIN
Changes since 1.25: +18 -19 lines
Diff to previous 1.25 (colored)

remove sess argument from all functions that only used it for logging
functions.
ok deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Wed May 8 20:00:25 2019 UTC (5 years ago) by benno
Branch: MAIN
Changes since 1.24: +116 -116 lines
Diff to previous 1.24 (colored)

remove sess argument from log functions. ok deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Thu Apr 4 04:19:54 2019 UTC (5 years, 1 month ago) by bket
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.23: +74 -4 lines
Diff to previous 1.23 (colored)

Add support for not crossing filesystem boundaries (-x) to rsync. Option
and behaviour is the same as GPL rsync.

Initial diff received feedback from benno@, schwarze@, deraadt@ and
florian@. Thanks!

OK deraadt@

Revision 1.23 / (download) - annotate - [select for diffs], Sun Mar 31 09:26:05 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.22: +22 -20 lines
Diff to previous 1.22 (colored)

Increasing strictness regarding signed-vs-unsigned types and their range
in the io-path, whic is done by seperating int vs uint functions variants.
reviewed by naddy, florian, and jsg

Revision 1.22 / (download) - annotate - [select for diffs], Sat Mar 23 23:22:57 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

Treat time from remote as unsigned 32 bit rather than signed, when
casting it into a time_t. If the remote doesn't muck things up, we may
make it through 2038.. (best that can be done without protocol repair
and coordination)
ok benno

Revision 1.21 / (download) - annotate - [select for diffs], Sat Mar 23 16:04:28 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.20: +10 -15 lines
Diff to previous 1.20 (colored)

indents and reflows around ERR*() and LOG*(); ok benno

Revision 1.20 / (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.19: +3 -3 lines
Diff to previous 1.19 (colored)

repair a few more yoda compares

Revision 1.19 / (download) - annotate - [select for diffs], Thu Feb 21 22:12:48 2019 UTC (5 years, 2 months ago) by benno
Branch: MAIN
Changes since 1.18: +7 -1 lines
Diff to previous 1.18 (colored)

kristaps 7721288a1d170f4d789bf7a7b822f14f91f7bcb9

In order for GPL rsync(1) to work with --delete when openrsync is a
remote sender, we need to set the FLIST_TOP_LEVEL bit for all
top-level directories. This is because the GPL rsync(1) uses this bit
to determine which directories to scan for files for deletion.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Feb 21 22:07:44 2019 UTC (5 years, 2 months ago) by benno
Branch: MAIN
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored)

kristaps acb8f263717f27691f0318d4b7154f854b7206b3

As found by benno@, if --numeric-ids is passed in, rsync does not send
or receive the uid/gid lists at all.  This also means that we need not
process the lists, as we're simply going to copy around the same
value.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Feb 16 16:25:45 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.16: +16 -12 lines
Diff to previous 1.16 (colored)

We need to send/receive the rdev after gid and before symlink.
From kristaps, thanks!

Revision 1.16 / (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.15: +2 -1 lines
Diff to previous 1.15 (colored)

I did some work here.

Revision 1.15 / (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.14: +40 -3 lines
Diff to previous 1.14 (colored)

implement -D and in turn -a

"you snooze, you get collisions" deraadt@

Revision 1.14 / (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.13: +2 -3 lines
Diff to previous 1.13 (colored)

unwrap lines which do not need wrapping

Revision 1.13 / (download) - annotate - [select for diffs], Thu Feb 14 18:26:52 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.12: +67 -15 lines
Diff to previous 1.12 (colored)

sync with kristaps, commit c5350b9055c3921001778275bb808a5c811c21c1

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.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Feb 12 19:39:57 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

whitespace and knf

Revision 1.11 / (download) - annotate - [select for diffs], Tue Feb 12 19:33:59 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

sync a chunk that was lost, from
commit 40bd0babafaa424d20af28128b76878d6cee7b87
Author: kristaps <>
Date:   Mon Feb 11 23:27:36 2019 +0000

    Normal form.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Feb 12 19:19:13 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.9: +11 -6 lines
Diff to previous 1.9 (colored)

sync
commit e589e5f657ef334e6fcbfb76962fbd380d13fd2e
Author: kristaps <>
Date:   Tue Feb 12 08:05:32 2019 +0000

    Put unveil() functions on their own line.  This makes it easier for my secret
    portability shim I use for valgrind on linux.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Feb 12 19:13:03 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.8: +5 -11 lines
Diff to previous 1.8 (colored)

sync
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.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Feb 12 19:04:52 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.7: +11 -201 lines
Diff to previous 1.7 (colored)

sync
commit bc997c5d70dbe402903c7ce0c915c7fe3744a754
Author: kristaps <>
Date:   Mon Feb 11 23:37:41 2019 +0000

    Move identifier code into ids.c.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Feb 12 19:02:06 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.6: +268 -26 lines
Diff to previous 1.6 (colored)

sync
commit 6300c70a476276aba832e7e2ba19e7e6e11a7cc7
Author: kristaps <>
Date:   Mon Feb 11 23:30:51 2019 +0000

    Integrate gid send/receive and remapping.  This remaps group identifiers as
    follows: first, look up all sender group names on the local host.  If we find
    them, use the local identifier.  Otherwise, use the remote identifier.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Feb 12 18:59:34 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.5: +29 -3 lines
Diff to previous 1.5 (colored)

sync:
commit 472ad2fab2692579a5773d78d6934b03c1098fb2
Author: kristaps <>
Date:   Mon Feb 11 20:45:22 2019 +0000

    Enable groupid in the protocol.  This is not linked to the system itself yet.

Revision 1.5 / (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.4: +69 -70 lines
Diff to previous 1.4 (colored)

swap comparison arguments as needed, to match idiomatic C most of us
are familiar with.  Proofed by florian and benno

Revision 1.4 / (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.3: +46 -46 lines
Diff to previous 1.3 (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.3 / (download) - annotate - [select for diffs], Sun Feb 10 23:56:19 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.2: +23 -26 lines
Diff to previous 1.2 (colored)

whitespace and 80 chars per line

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: +10 -10 lines
Diff to previous 1.1 (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

Import Kristaps' openrsync into the tree.
OK deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.