Commits
- Commit:
1c28a36116110db5de40e6edf09887651f3ca37b
- From:
- Omar Polo <op@omarpolo.com>
- 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:
5326bd73c63d9b453093bf46a5a514283348d0ec
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add bounds check when reading a delta offset from a packed object
ok stsp@
- Commit:
82031ac84c8cf40b9d7373d07cf94423b8a7bf22
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add missing `goto done;' on error path; ok stsp@
- Commit:
789899c8e706b0688fa908fd0c36a423bd8228c6
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix spelling of "FastCGI"; patch by Josiah Frentsos; ok op@
- Commit:
e082ed67081c3f126a8c83d3ea8b5b49bb576a90
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
fix off_t type mismatch
off_t is a signed type and depending on the platform, it can be
"long" or "long long", so cast to long long for printf().
- Commit:
2c75f174eaa5edecfcf15dd4e81c87a70c53b21e
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
rebase.sh: remove accidentally included absolute path to "got"
- Commit:
88dec1791eeb2f779795789b119d5bf675c24b6a
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix gotd(8) usage() string; patch by Josiah Frentsos
- Commit:
f1aec6edf3cf139d631d740ffc7f9428c913685c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix regression test failures with Git 3.30.5 / 2.38.1 or later installed
The fix for CVE-2022-39253 in Git made our regression tests fail since
creating submodules from local clones is no longer allowed by default.
Add an override to our invocations of "git submodule add", the same
which was added to Git's regression test suite as part of their fix.
This CVE doesn't otherwise affect us. We do not implement submodules.
Our use of them in regression tests exists only to ensure that Got does not
freak out when it sees one. Precisely because automated support for nested
repositories and/or working copies (as in Git Submodules, or Subversion
Externals, etc.) have been an endless source of security problems in
other systems.
sudden test failures pointed out by naddy@
- Commit:
24d916d21f287fd70d7ba70f077a8d84c3fdee7c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
change got_pack_parse_offset_delta tslen argument to size_t
The tslen argument is always in the (1..9) range so `int' is technically
fine (even int8_t would be!) but all the callers are passing a size_t,
so change the type accordingly.
ok stsp@
- Commit:
40c2b7bf80b949ca460bac3c15cc771c312c1a79
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
gotsh.1: Use Sx for referencing EXAMPLES; patch by Josiah Frentsos
- Commit:
7ed3254516698a6f5f29368f0adff0b8770a64df
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
bump version number
- Commit:
cb856630ec5e66705fa6218059d6200980d797f9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
CHANGES for 0.77
- Commit:
fbad57677b50946db6f27436ff7de698d2ab58bc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
do not require gotd(8) to be installed in /usr/local; dev builds go to ~/bin/
- Commit:
08ace0e9934b81ee64585f185df023b4d20ee5a7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
sync distfile list
- Commit:
e45c294c2605016fcafbc76e8f911ae3dd126e7b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
avoid printing harmless errors that can occur when tog exits due to Ctrl-C
ok jamsek
- Commit:
8b60b240b1d6adf264bc5d0fd5ae0fce756d0086
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
fix typo in gotsh.1
ok stsp@
- Commit:
f044c8414b8ab21062f8866d8336fa7c8bf21897
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix detection of SIGTERM in tog; this signal was accidentally being ignored
ok jamsek
- Commit:
74ef8aae7e2bc5e35fe53a09877d13f1bc5ccaf5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
close parent's end of imsg pipe before waiting for a child process to exit
Prevents a dead-lock in 'tog log' where tog wants to exit (e.g. because
the user pressed Ctrl-C) while a got-read-pack child process wants to
send more commits.
Closing the parent's pipe descriptor makes writes to the pipe fail in
the child process. The child then unwinds via an ERR_EOF error and
exits, instead of forever polling its end of the pipe in order to
write more data.
ok jamsek
- Commit:
bc854c7bc75429b27c69c3d76a040b8c428799ad
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
allow gotsh(1) to be installed as git-receive-pack and git-upload-pack in $PATH
- Commit:
13b2bc374c1870ec27b2eeb40efe68fd465f64bb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
introduce gotd(8), a Git repository server reachable via ssh(1)
This is an initial barebones implementation which provides the absolute
minimum of functionality required to serve got(1) and git(1) clients.
Basic fetch/send functionality has been tested and seems to work here,
but this server is not yet expected to be stable.
More testing is welcome. See the man pages for setup instructions.
The current design uses one reader and one writer process per repository,
which will have to be extended to N readers and N writers in the future.
At startup, each process will chroot(2) into its assigned repository.
This works because gotd(8) can only be started as root, and will then
fork+exec, chroot, and privdrop.
At present the parent process runs with the following pledge(2) promises:
"stdio rpath wpath cpath proc getpw sendfd recvfd fattr flock unix unveil"
The parent is the only process able to modify the repository in a way
that becomes visible to Git clients. The parent uses unveil(2) to
restrict its view of the filesystem to /tmp and the repositories
listed in the configuration file gotd.conf(5).
Per-repository chroot(2) processes use "stdio rpath sendfd recvfd".
The writer defers to the parent for modifying references in the
repository to point at newly uploaded commits. The reader is fine
without such help, because Git repositories can be read without
having to create any lock-files.
gotd(8) requires a dedicated user ID, which should own repositories
on the filesystem, and a separate secondary group, which should not
have filesystem-level repository access, and must be allowed access
to the gotd(8) socket.
To obtain Git repository access, users must be members of this
secondary group, and must have their login shell set to gotsh(1).
gotsh(1) connects to the gotd(8) socket and speaks Git-protocol
towards the client on the other end of the SSH connection.
gotsh(1) is not an interactive command shell.
At present, authenticated clients are granted read/write access to
all repositories and all references (except for the "refs/got/" and
the "refs/remotes/" namespaces, which are already being protected
from modification).
While complicated access control mechanism are not a design goal,
making it possible to safely offer anonymous Git repository access
over ssh(1) is on the road map.
- Commit:
1af8800025bf22cf87cde038bbcfda0d2564eefc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
refresh cached list of pack index paths while searching a packed object
Previously, this list was only refreshed while trying to match an object
ID prefix. Regular pack file access needs to refresh this list, too.
In particular, future gotd(8) needs this to ensure that newly uploaded
packfiles are picked up as expected.
- Commit:
9316cc27bdc5db7db6927879f3c47b63f1c8ded2
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch integers used for counting objects while indexing pack files to unsigned
- Commit:
09ee8ded96c5163fc8b06a8bdba606db19b2974a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
provide a more useful error if the size of a packed object won't fit in 64 bits
- Commit:
713d6e1144f1c1a21dd9013eab0cdf75a6b01ab8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
let callers of got_pack_index() configure the rate limit of progress reporting
- Commit:
0136599f8fc0aa5d26834c46a9b9feb48d12c726
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move pack indexing code into new file lib/pack_index.c
Prepares for sharing code between got-index-pack and future gotd(8).