Commits
- Commit:
098056c9af1a2a51aeabb65765cdce5ffc5f1021
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style: no-op change in practice
change so it matches the style used in the rest of the tree.
ok stsp
- Commit:
3d97effaa4fe16c79f725bf260f06220e62e5c6a
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
convert to use imsg_get_fd()
While here also fix a fd leak in got-read-pack. We were dup'ing
imsg.fd without closing imsg.fd later; instead just use imsg_get_fd()
to extract the file descriptor.
Tested by falsifian and Kyle Ackerman, thanks!
'go ahead' stsp@
- 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:
dc43cdc9c619cfe64774791cffda578d9c0f6e8d
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
introduce got_error_checksum
ok stsp@
- Commit:
28d1e31ec4a08d25cc98f69caa627207de484a7f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
another memcmp -> got_object_id_cmp
- 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:
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:
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:
12f2167a2e638b44a8d0c2c163448011485067b3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add checksum parameters to got_inflate functions which did not provide them yet
- Commit:
08578a35f60be8657db97b705f27a55ab61850c8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make close(2) failure checks consistent; check 'close() == -1' everywhere
ok millert, naddy
- Commit:
56b63ca4ab1049de6fa2d6910ce22c16e2b42a53
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere
ok millert, naddy
- Commit:
23c57b285fdcf9a8a0a5913ea096232038bf0ac3
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
Stop including <sys/syslimits.h> directly.
POSIX says the limits defined there are available from <limits.h>,
which almost all affected source files already included anyway.
ok millert stsp
- Commit:
81a12da58651e79380d81dea7020bf6af20bb28b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
do not rely on <zlib.h> to pull in <unistd.h>
ok stsp
- Commit:
6fb3a4970337c135644ac0ef619a7e96616e4230
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add optional 'consumed' output parameter to got_inflate_to_mem()
- Commit:
12ce7a6cb20e62e36b3430f7bbada96069749f8b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
include <limits.h> instead of <sys/limits.h>; patch by Thomas Klausner
- Commit:
cc62643986abd93b4a2dae15c40415c625646fc2
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got-read-blob account for header len in size check
Fixes "no space" error with blobs which happen to straddle the
size boundary for in-memory handling.
- Commit:
4492af8432c70fe0b00cc5736f17590c29d79068
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
plug a memory leak in got-read-blob
- Commit:
638f9024045bbe2420143f8868dcc484c231c634
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_error_prefix_errno() to got_error_from_errno()
- Commit:
656b1f76d3a6f52318782284fa83ae47894cbffb
- From:
- joshua stein <jcs@jcs.org>
- Date:
while (1) -> for (;;)