Commits


use capsicum on FreeBSD Thanks to the design of Got, the libexec helpers don't need any resource (in fact they run under pledge "stdio recvfd" on OpenBSD) and so using cap_enter(2) on FreeBSD is dead-easy. While the main process can't be sandboxed on FreeBSD (needs to exec the helpers), all the tough work is done by these small libexec helpers which is also the biggest attack surface. tested by naddy, ok thomas


imsg_add() frees its msg argument on error; avoid double-free in error paths


portable: add support for landlock landlock is a new set of linux APIs that is conceptually similar to unveil(2): the idea is to restrict what a process can do on a specified part of the filesystem. There are some differences in the behaviour: the major one being that the landlock ruleset is inherited across execve(2). This just restricts the libexec helpers by completely revoking ANY filesystem access; after all they are the biggest attack surface. got send/fetch/clone *may* end up spawning ssh(1), so at the moment is not possible to landlock the main process. From Omar Polo.


mark some function parameters as 'const', as they should be; patch by Omar Polo


portable: add FreeBSD support This adds the capability to compile got-portable on FreeBSD.


portable: initial Linux compilation This commit modifies the GoT main branch to be able to compile it under linux.


provide separate send {} and fetch {} configuration blocks in got.conf Feature requested by naddy. ok naddy, who also suggested some tweaks that will arrive shortly


make close(2) failure checks consistent; check 'close() == -1' everywhere ok millert, naddy


detect unknown repository format extensions (such as sha256 format) ok millert


send gitconfig imsg string values the same way as gotconfig ones are sent


Stop including <sys/syslimits.h> directly. POSIX says the limits defined there are available from <limits.h>, which almost all affected source files already included anyway. ok millert stsp


do not rely on <zlib.h> to pull in <unistd.h> ok stsp


move functions from privsep.c to the helpers which use them where possible


add support for repository mirrors to 'got clone' and 'got fetch'


read repository owner name with gitconfig parser instead of a hand-rolled one


parse remotes from gitconfig


obtain repo format version and commit author name/email from .git/config