Commits
- Commit:
3efd8e3122b7d03a046d23fd5eed22c1b78f8ceb
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
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:
3cb9337907f257b2eb23c58f951d0a39407eebe8
- From:
- Josh Rickmar <jrick@zettaport.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
6dc6a24ce5eb2ed4c94b53a3cde4cd13415c35e1
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix buf_alloca error handling
Left-over from how OpenRCS/OpenCVS do error handling. OK stsp@
- Commit:
063406214771fb1483c7582bc7bd45f5d6b26c48
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add O_CLOEXEC (close-on-exec) flag to open(2) calls
suggested by millert
ok thomas_adam
- 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:
db59069162efd1ccd4f236abe7d8eb3ca4b791e4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make merge_file() accept FILEs instead of paths for orig and deriv inputs
- Commit:
08578a35f60be8657db97b705f27a55ab61850c8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make close(2) failure checks consistent; check 'close() == -1' everywhere
ok millert, naddy
- Commit:
54415d85f1bbe99a1740cbad8ec7727c205c913b
- From:
- Tracey Emery <tracey@traceyemery.net>
- Date:
kn@ and stsp@ suggested changes
- Commit:
96cbb59708cdbe5ff619b9d9cccae495277071e5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove worklist code; it was only used to unlink files which we already unlink
- Commit:
575e82180aa41c12a56f88f1c9dd01d1bac56424
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
more mechanical conversions to struct got_error: buf_load() and buf_alloc()
- Commit:
57ebf19f2d3fab10b9053e7c865cbd251e1ded0d
- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
buf_alloc: free whole BUF* in allocation failure path
- Commit:
202329ae1b4393a9093c61915de94a5a9a51555a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix some more occurrences of potential errno clobbering
- Commit:
638f9024045bbe2420143f8868dcc484c231c634
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_error_prefix_errno() to got_error_from_errno()
- Commit:
230a42bdc60c6136d2a5ce65bf1a2f26d990c096
- From:
- joshua stein <jcs@jcs.org>
- Date:
got_error_from_errno -> got_error_prefix_errno
also add got_error_prefix_errno2 and got_error_prefix_errno3 which
should hopefully all be merged into a single function with variadic
args (but can't alloc mem)
- Commit:
3a6ce05aff1497b3b590a07e1dccad289ad84d0f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
check for errors from close(2)
- Commit:
af45e626271e0fd075c36e588c0da02868393b4c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
get rid of xmalloc and err functions in buf.c
- Commit:
74b37681cba183e4655a6b08701e64aeac7c9a05
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add unmodified buf.c, buf.h, and diff3.c from OpenRCS