Commits
- Commit:
ae25a666dd4099105786ef32f1e6ebaf92abe64d
- From:
- Omar Polo <op@omarpolo.com>
- 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:
53bf0b541977b66862040d4b633fb6b5d3a3c6c8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- 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:
161b566ff8fdc61984f077c6ab1d75b5f0fd5ac7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
lib/object_create.c: calloc object ids
future fields added to the got_object_id will be implicitly zeroed
instead of gibberish.
ok stsp@
- Commit:
b90054ed55f30ebe28115abf5ad9cecc2b925713
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use mkstemps(3) instead of mkstemp(3) for opening named temporary files
Allows 'got commit' to use a ".diff" suffix for temporary diff files.
ok op@
- Commit:
40831471082f880a26b73987b595a52dc1c93794
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
don't create signed tag objects with trailing NUL
Although Git itself did not care, the superfluous NUL at the end of
the tag object was breaking GitHub's SSH signature detection.
ok stsp@
- Commit:
438d0cc30baf8e97fd870f5e620833e0a45401aa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix snprintf error handling
follow the "proper secure idiom" described in the CAVEATS section of
printf(3). reminded by tb@ and millert@
- Commit:
c9e76cc42e880db2e858c1e99942214157bd7ea9
- From:
- Florian Obser <florian@narrans.de>
- Date:
Prevent memory leak when asprintf fails.
Found by llvm's scan-build.
OK stsp
- Commit:
1bd8e3b16ccbc427fca485fda6db88babc57dc2b
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
fix pipe usage for linux
This uses the correct read and write ends of the fds returned by
pipe(2) on linux. It also moves away from creating FILE* streams with
fdopen and reading the stream with buf_load (which performs a fstat,
and breaks due to a zero length file size on linux) by instead reading
from the fd itself.
Reported by abieber@, with assistance from stsp@
ok stsp@
- Commit:
91d845ad5d8f8897e51d3f9233a9ea3e89fee80d
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
fix tag signing when the key file does not exist
This should fail without creating any tag. Before, ssh-keygen(1)
would print an error to stderr, but got would create an unsigned tag.
ok op@
- Commit:
4d5ee9564a9e46a1f634f619833c62f636cfbdc1
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
create and verify tags signed by SSH keys
This adds a new -s flag to 'got tag' that specifies the signer
identity (for example, a key file) of the tagger. The tag object will
include a signature that validates each of the tag object headers and
the tag message.
Verifying these signed tags requires maintaining an allowed signers
file which maps signer identities (i.e. the email address of the
tagger) to SSH public keys. See ssh-keygen(1) for more details of the
allowed signers file. After creating this file and providing the path
to it in got.conf(5) using the allowed_signers option, tags may be
verified using with 'got tag -V tag_name'. The return code will be
non-zero if a signature fails to verify.
ok stsp@
- Commit:
336075a42a5ae0fa322db734c481d21998e82bb8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
build with -Wmissing-prototypes
ok stsp@
- Commit:
d7b5a0e827bb38e5c8502f0ba8d7838fedaba19b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
inline struct got_object_id in struct got_object_qid
Saves us from doing a malloc/free call for every item on the list.
ok op@
- Commit:
72840534edfc1ffa7aafa0ce0ab42568c8ec7145
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
compress delta data from delta_cache directly into pack file
- Commit:
8bd0cdad05519cbb08d8d11223bdde0472678150
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add O_CLOEXEC (close-on-exec) flag to open(2) calls
suggested by millert
ok thomas_adam
- Commit:
ed7cc4a82151aea060ad46169c957da2f37a8948
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove outdated comment
- Commit:
5c02d2a555dc01ac06db5a47b8c81adf2bf3f8a6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
for portability, handle errno variations upon open(2) failure with O_NOFOLLOW
Problem pointed out by naddy for FreeBSD -portable.
Discussed with millert, thomas adam, and naddy.
- Commit:
f259c4c18277237ced1043033cb1af739f73db28
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add a 'got merge' command for creating merge commits
Additional testing by Thomas Adam.
ok tracey
- Commit:
5345b4c7e102ec42f81e1b9b229294a0774d9b40
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
allow lockfiles to be used in cases where we have a dir_fd and a relative path
- 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:
91b40e30e0dbff0c8a1546a02fb784fa8007a91b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add checksum support to got_deflate_to_file()
This will eventually be used by 'gotadmin pack'.
Checksum init and finalization will need to be done by the caller
since many objects will be written out in compressed form while
we are computing checksums across the entire pack file.
ok millert, naddy
- 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:
3818e3c42c1ac77dac0c571165dabfe2da05ff2b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
convert all remaining instances of chmod(2) to fchmod(2)
ok stsp
- Commit:
1367695b58142d73ad701f34f04fe45c4ad2782b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
fix potential type mismatches between format specifiers and arguments
Cast printf arguments of type time_t and off_t to long long to match
the %lld format specifier on platforms where this might not be the
case. In parse.y, switch the number variable to long long because
all its interactions are with that type anyway.
ok millert stsp