Commits
- Commit:
3c23f6cdb61cc63d6fd9ecbcc015cd1347793eb1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
introduce got_error_checksum
ok stsp@
- 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:
980c6786a419950816c67eb1b53e021ebdfe483c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got rebase' work when the to-be-rebased branch has no parent commit
found by and ok op@, who also provided the test case
- Commit:
365cf0f34d08316d433e730a8663283029f729b3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move "unix" pledge promise from gotd parent to auth process
The listen process now communicates the client UID/GID to the parent,
and the auth process verifies this on behalf of the parent.
This allows us to remove the "unix" pledge promise from the parent,
removing parent access to syscalls such as listen() and accept() in
the AF_UNIX domain.
ok tracey@ op@
- Commit:
21f077265038a0c30c857035d2ab286f293573b1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
require space between commit author name and email, for Git compatibility
Allowing such author fields breaks 'got send' towards Github for affected
commits because git-index-pack --strict will error out on the server:
$ git index-pack --strict pack-de791fb6a3a1961e44ac5d98d72fd533bf9277c8.pack
error: object 5d6bde9eaaf27f41ae8fa7112bb45e489d3c16b9: missingSpaceBeforeEmail:
invalid author/committer line - missing space before email
fatal: fsck error in packed object
problem encountered by landry@
ok op@
- 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:
d2533287ff253bfb6fe08ddc0005ac3349fdf38c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove accidentally committed debug assertion
- Commit:
e02b422b6f7736de0e851b3f8fad812e77e9c6b4
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
disallow integrating into references outside refs/heads/
Spotted by stsp@ while considering a feature request for
cmd_integrate.
ok stsp@
- Commit:
58381f7013ee220415b44aaf36c549b2f1cd2937
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: percent-decode the received query string
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:
62b21d332b3a92a7f99022d68bc8fd98a4682d33
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got commit: add flag to specify the author
This adds a new flag, `got commit -A', that allows to specify the commit
author but retains the "committer" (which is obtained as usual via
GOT_AUTHOR, got.conf or git config.)
with lots of help from and 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:
f9d376997dd2e84bf84c3c9a4da842d1b5565e9d
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move got_opentempfd() out of lib/diff.c again
ok tracey
- Commit:
61af9b215c06bece11deb27d941b390b81e0f8c6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
implement support for commit coloring in got-read-pack for speed
ok op, tracey
- Commit:
a7472cb3288c2323830462f53706b013f33c444e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
check return value of RB_INSERT; ok + memleak fix by op@
- Commit:
70cc983209a406b57dc37c4515e1cb9a038e0f2c
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
move got_errors[] table into a single compilation unit (error.c)
ok stsp
- 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:
9a02f8b79138972ddde059e5683108d07b409289
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch to strerror_r(3) in error.c for thread-safety
- Commit:
c884fd0a8efbd1c76504f46ddb5b688134983a3a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
introduce got_custom_error array to support multiple errors in flight
This is still not thread-safe but at least avoids errors overwriting each
other in single-threaded contexts.
- Commit:
73e7eb7d1cfead096b0297377490aeaac95a73f5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add got_error_fmt()
got_error_fmt() could eventually replace got_error_path() which has already
been used to construct errors with strings that are not actually paths...
ok millert@
- Commit:
4cc6a5a5fa3d5a5351d59385e614a0a78d167987
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add got_error_from_errno_fmt() for more flexibility in error messages
suggested by and ok millert
- Commit:
16aeacf7088dcd3cd5e654af46a3015cecf41426
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use size_t for loop indices to avoid signedness warnings; from emaste@freebsd
- Commit:
cc483380c54d31f8ddf61787337cefe1ccf3581b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix NULL deref in got_error_from_errno via got_error_uuid (found by jasper)
- Commit:
7d45c7f1ef956f45432c26a99b9d874dfac2cfdc
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
error.c: use <limits.h> instead of <sys/param.h>