Commits
- Commit:
eca2b1d0d697cef723df2d1394b84b636c02ced0
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add missing bounds-check in gitproto ref-line tokenizer
- Commit:
99fd9ff4bf6d3bee4a29f13ef4ae81aa36fdd4d5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
always cast ctype' is*() arguments to unsigned char
ok stsp@
- 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:
e99d9267c8cc287a60f768d4282c01b9f5f6c975
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
plug memory leaks in got-fetch-pack and got-send-pack
ok naddy
- Commit:
8a8621c2c1b416695060a8fdd3f5973c4e62a603
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
add missing <sys/types.h> include
- Commit:
e33e440b685fac5ee693a2d2072d865d36352e89
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
whitespace fix
- Commit:
bd3d9e54cb422cb58d52b267c6a8afc3376842d2
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move more code used by got-send-pack and got-fetch-pack to a common file
Move functions and data structures which implement Git protocol features
required for fetching and sending pack files to new files lib/gitproto.c
and lib/got_lib_gitproto.h.
This code was duplicated in got-fetch-pack and got-send-pack.
No functional change.