Commits
- Commit:
4fccd2fe0ffbbc668b66abe63614470635f92f1b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: configure: split out dependencies
Rather than assume all dependencies are required for all programs, split
them out.
This will make packaging easier, as well as splitting the code to use
subprojects.
Note that due to the use of config.h semantics, in most cases the
got_compat.h header file is now at the top of the .c file it is included
in, so that it can handle the system header inclusion properly.
- Commit:
b16893ba284e90739fc814673523878e8874dc0f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add some helper functions to compute hashes
This adds a set of functions to abstract over SHA1Init, SHA1Update,
SHA1Final, their respective SHA256 variants and how to compare digests.
Replace all the SHA1*() usage with the new APIs. It's a preparatory
step for sha256 handling.
ok stsp@
- Commit:
98670ba726486c39efff220ab1e074c62023aae7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: rework SHA detection
Simply the SHA detection by not predicating on libcrypto, but instead
checking individual header files.
- Commit:
4680f704353811c8bb6ce65eac3714d1bd200c26
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: remove sha1.h; found portably
Remove sha1.h as this is found portably across systems.
- Commit:
588a8092bc282294ee23585991e81586905a8fd4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
66e6097f5d9b6050841626edfd5c094114eeae28
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
convert got_pack' filesize to off_t; ok stsp@
- Commit:
aa75acde9c5f406b658c54827bc596cf96d7c64e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
check size before calling mmap(2)
It's only a preparatory step, as checking whether a size_t is less than
SIZE_MAX is moot. In a follow-up commit, however, the `filesize' field
of the struct got_pack will become off_t and these checks will kick in.
This also makes consistent how we guard mmap(2) against empty files.
ok and improvements stsp@
- Commit:
f9ee84c0aa84934aa85434cf0908cca74952d652
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: look for headers portably
- Commit:
eebe1fbb435993f59691cf7d16c21d3f5a8d1bb3
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
switch integers used for counting objects while indexing pack files to unsigned
- Commit:
aecd22250a8ec26da244683ed64b290af0e1c5f3
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
let callers of got_pack_index() configure the rate limit of progress reporting
- Commit:
142012ed272189c29b42a3ec63ff2598b82ec88f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
move pack indexing code into new file lib/pack_index.c
Prepares for sharing code between got-index-pack and future gotd(8).
- Commit:
b6b86fd1b9828e38d59915e62fddce62952b8b75
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- Commit:
406d5a24d29a81e1741aed65acc1f1000c44f0d3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
convert two snprintf to strlcpy
"looks good to me" millert@
- Commit:
8b925c6ccd3968917253ea191906a1710c40ed2d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add back sys/queue.h
Now that the handling of including sys/queue.h is better, there's no
need to remove those lines from the source. Copy the location of those
original sys/queue.h lines from upstream at the same line number, so as
to avoid any conflicts in the future.
- Commit:
5d120ea8410ddc2808e476d554ba931dc19d8c50
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use capsicum on FreeBSD
Thanks to the design of Got, the libexec helpers don't need any resource
(in fact they run under pledge "stdio recvfd" on OpenBSD) and so using
cap_enter(2) on FreeBSD is dead-easy.
While the main process can't be sandboxed on FreeBSD (needs to exec the
helpers), all the tough work is done by these small libexec helpers
which is also the biggest attack surface.
tested by naddy, ok thomas
- Commit:
a5061f770a80b2e450a8c950f658880b703607ba
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
convert delta cache to a hash table
This approach uses more memory but is much faster. To offset the
additional memory usage somewhat the cache now stores very small
deltas only. However, overall memory usage goes up. Hopefully we
will find a way to reduce this later.
ok op@
- Commit:
87c63bee573e61fa75676625e91db4032c3a755f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
apply time-based rate-limiting to got-index-pack progress output
- Commit:
97799ccd4b67a81f97039305d4fdd66588da9962
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add support for landlock
landlock is a new set of linux APIs that is conceptually similar to
unveil(2): the idea is to restrict what a process can do on a
specified part of the filesystem. There are some differences in the
behaviour: the major one being that the landlock ruleset is inherited
across execve(2).
This just restricts the libexec helpers by completely revoking ANY
filesystem access; after all they are the biggest attack surface. got
send/fetch/clone *may* end up spawning ssh(1), so at the moment is not
possible to landlock the main process.
From Omar Polo.
- Commit:
8c2924d74a7af654f823d4c32c74ab7e4cf5651c
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
plug memory leak in an error path of read_packed_object()
- Commit:
812c68380e543d8814df8169aa1fb47f70e19378
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix wrong function names in error messages from got-index-pack.c
- Commit:
92a9e85d28a30997176ce0d3c2915e3ea70782c7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add FreeBSD support
This adds the capability to compile got-portable on FreeBSD.
- Commit:
dd038bc6ec835ad3fd3c0b5303b8af9ad506c8cc
- From:
- Thomas Adam <thomas@xteddy.org>
- Via:
- Thomas Adam <thomas.adam@smoothwall.net>
- Date:
portable: initial Linux compilation
This commit modifies the GoT main branch to be able to compile it under
linux.
- Commit:
d5c81d448ae4eec21053152e1c82c66eb11ca7a4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
verify object ID checksums while loose objects are being accessed
- Commit:
dbdddfee1482b50ca8c4a0be06e4fec6a59fb9f4
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
switch from SIMPLEQ to equivalent STAILQ macros
The singly-linked tail queue macros were added to OpenBSD 6.9 and
are more widely available on other systems.
ok stsp
- Commit:
85f4e1e7d36a206d3861d49c00e207d3e7fcab80
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix the type of variable 'idx' in update_packidx()