Commits
- Commit:
9afa3de221045d529287cc3fa75fdc2915aed5c1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add support for protecting references against 'got send -f' to gotd
ok op@
- Commit:
bbc740ac4905ed0d4ba6334f6225c8f8c9f3c394
- From:
- Omar Polo <op@omarpolo.com>
- Date:
introduce got_object_id_hex to replace some got_sha1_digest_to_str()
It's an analogous to got_object_id_str but writes to the given buffer.
ok + improvements by stsp@
- Commit:
758dc042e8fc2399dc58d96ce6d80b4a0adf4705
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- 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:
d294b1dcc034776a6df07345f9af90e594409062
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
allow got_object_parse_tree to reuse entries buffer allocations for speed
ok millert@
- Commit:
9985f404ff5dc911b6186e5fa6233fa36848a19a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
parse tree entries into an array instead of a pathlist
Avoids some extra malloc/free in a performance-critical path.
ok op@
- Commit:
c0df59665de91324eeab1808c6c4e41343f21789
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
wrap overlong lines
- Commit:
d5c81d448ae4eec21053152e1c82c66eb11ca7a4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
verify object ID checksums while loose objects are being accessed
- Commit:
5aa813935b6489921083da5ed9459a1cfb8a03e3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add copyright year for files already touched in 2020
- Commit:
b87b4170d4b402d61585cf4d458c0b58ab49095f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename to parsed_tree_entries_free for clarity (don't use with got_tree_object)
- Commit:
b64b1f953a75e1e6639a1fd16a0dc4ce19f4ae78
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
plug a memory leak; parsed tree entries were not freed
- Commit:
56e0773df7e12fc69c1f6f9d171c93fd78a13d0e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
convert tree entries from SIMPLEQ to an array
- Commit:
3022d2728c5aaec4a574a76d30136d850fa5d154
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
reduce the amount of memcpy() and strdup() while parsing tree entries
- Commit:
ed1754272216c57ee4359f0fc8d35279b9dfa381
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
more progress on generating new tree entries
- Commit:
9f2369b01b5aa26b593dd3be183134e1755ad7e4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make all the read_privsep functions local to object.c
- Commit:
ebc55e2dfc648063c434cc7a708ac24d266efbdb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
eliminate got_object_open() round-trip when opening blobs
- Commit:
268f7291e63638be363b7bccd95f97a73298d039
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
eliminate got_object_open() round-trip when opening tags
- Commit:
13c729f71056495e3b532f94badea43f10d98f49
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
eliminate got_object_open() round-trip when opening trees
- Commit:
a158c90155bc8066c8f6d87a4a9600d8c5bf54c8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make all the _packed_read_privsep() functions local to object.c
- Commit:
1785f84a3a2f8d9dd6b73551560405f87a2e2ebb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
eliminate got_object_open() round-trip when opening commits
- Commit:
f4a881ce8b200e5283247799c39abd2b578b8e75
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
more support for tag objects; new code is not yet reachable
- Commit:
5df4932d8e7905f8e04dbf16e3879da18a091cec
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
improve handling of struct got_object_qid allocations
- Commit:
41fa143713753fc592bd4dcd8894b4de6a5f7350
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
back out mini-commits; no significant performance difference
- Commit:
710f3f4e5168164687c5586641920d82960b0a3a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got-read-pack pre-seed the main process mini commit cache
- Commit:
05e1230b0e68bb81cdae380edccc969dd16215dc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_commit_object_mini to got_mini_commit_object