History log of /openbsd-current/usr.bin/rsync/flist.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.38 27-Dec-2023 claudio

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 tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.37 26-Dec-2022 jmc

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


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.36 03-Nov-2021 deraadt

whitespace observed during a read-through


# 1.35 22-Oct-2021 claudio

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 tags: OPENBSD_7_0_BASE
# 1.34 02-Sep-2021 deraadt

branches: 1.34.2;
remove sys/param.h that snuck in, by replacing MAXPATHLEN with PATH_MAX


# 1.33 29-Aug-2021 claudio

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.


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

branches: 1.31.2;
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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.37 26-Dec-2022 jmc

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


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.36 03-Nov-2021 deraadt

whitespace observed during a read-through


# 1.35 22-Oct-2021 claudio

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 tags: OPENBSD_7_0_BASE
# 1.34 02-Sep-2021 deraadt

branches: 1.34.2;
remove sys/param.h that snuck in, by replacing MAXPATHLEN with PATH_MAX


# 1.33 29-Aug-2021 claudio

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.


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

branches: 1.31.2;
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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.36 03-Nov-2021 deraadt

whitespace observed during a read-through


# 1.35 22-Oct-2021 claudio

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 tags: OPENBSD_7_0_BASE
# 1.34 02-Sep-2021 deraadt

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


# 1.33 29-Aug-2021 claudio

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.


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.35 22-Oct-2021 claudio

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 tags: OPENBSD_7_0_BASE
# 1.34 02-Sep-2021 deraadt

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


# 1.33 29-Aug-2021 claudio

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.


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.34 02-Sep-2021 deraadt

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


# 1.33 29-Aug-2021 claudio

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.


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.33 29-Aug-2021 claudio

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.


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.32 30-Jun-2021 claudio

Replace Id: tags with OpenBSD: tags
OK deraadt@


Revision tags: OPENBSD_6_9_BASE
# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.31 22-Mar-2021 claudio

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@


# 1.30 22-Mar-2021 claudio

Adjust function name in error strings.
From kristaps@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.29 27-Jun-2019 deraadt

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


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.28 23-Jun-2019 benno

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.


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.27 02-Jun-2019 deraadt

spelling; from Hiltjo Posthuma


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.26 08-May-2019 benno

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


# 1.25 08-May-2019 benno

remove sess argument from log functions. ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.24 04-Apr-2019 bket

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@


# 1.23 31-Mar-2019 deraadt

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


# 1.22 23-Mar-2019 deraadt

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


# 1.21 23-Mar-2019 deraadt

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


# 1.20 18-Mar-2019 deraadt

repair a few more yoda compares


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.19 21-Feb-2019 benno

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.


# 1.18 21-Feb-2019 benno

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.


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.17 16-Feb-2019 florian

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


# 1.16 16-Feb-2019 florian

I did some work here.


# 1.15 16-Feb-2019 florian

implement -D and in turn -a

"you snooze, you get collisions" deraadt@


# 1.14 16-Feb-2019 deraadt

unwrap lines which do not need wrapping


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.13 14-Feb-2019 florian

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.


# 1.12 12-Feb-2019 benno

whitespace and knf


# 1.11 12-Feb-2019 benno

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

Normal form.


# 1.10 12-Feb-2019 benno

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.


# 1.9 12-Feb-2019 benno

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.


# 1.8 12-Feb-2019 benno

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

Move identifier code into ids.c.


# 1.7 12-Feb-2019 benno

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.


# 1.6 12-Feb-2019 benno

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.


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@


# 1.5 11-Feb-2019 deraadt

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


# 1.4 11-Feb-2019 deraadt

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


# 1.3 10-Feb-2019 benno

whitespace and 80 chars per line


# 1.2 10-Feb-2019 benno

fix whitespace


# 1.1 10-Feb-2019 benno

Import Kristaps' openrsync into the tree.
OK deraadt@