Commits
- Commit:
d392cc0a86905f1c82da0736472b8ad89248c476
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got fetch -b branch' error reporting more helpful
The patch to got-fetch-pack.c was written by stsp with only minor tweaks
by me. Regress updated to account for the change in reporting.
stsp's original got-fetch-pack.c diff ok op jamsek
ok stsp@
- Commit:
e0380e3dfa71712eaaf9642b4d86b53e6a986653
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
special case 'got fetch -b <branch>' to only fetch <branch>
As discussed on irc, this drops the implicit remote HEAD fetch when -b is used.
got.1 has been updated to make the new fetch behaviour clear.
ok stsp@
- Commit:
84073f62fdfec793493251a7adbb339cd265a45b
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: use intermediate pointers to plug leak on realloc
And save worktree_branch_len for reuse.
ok stsp@ and op@
- Commit:
9d0a7ee35139cbfd755c1647d0feeaa665e1a2a2
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix interaction of 'got fetch -b', got.conf, and work tree
Without branches in got.conf for a remote, and without -b/-R options,
the fallback to HEAD would only work when not invoked in a work tree.
With this fix 'got fetch' should behave as described in the man page.
The -b option now overrides both got.conf and the fallback to the work
tree's branch.
And fallback to HEAD works as expected when invoked in a repository.
Also, do not strictly require remote repositories to provide a branch
from the refs/heads/ namespace. In such cases users should be able to
use -R to select something to fetch.
ok jamsek
- Commit:
9228a15c477d8ec5797456ed322923d97fd9e92d
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got_imsg_fetch_ref: use struct instead of buffer for id
ok stsp@
- Commit:
f9f544689c6f4d8dd6dfb97da00ffbaf987ddab4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got_imsg_fetch_have_ref: use struct instead of buffer for id
ok stsp@
- Commit:
fcbb06bf6925b542428b937afc9f37446058e748
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
replace malloc+memcpy with strndup. no functional change intended
ok stsp@
- Commit:
21c2d8be42605670e7037d011fea06c5efd5f725
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: minor refactor of got_pathlist_free() API
Accept flag parameter to optionally specify which pointers to free. This saves
callers looping through the list to free pointers.
ok + fix stsp@
- Commit:
d639f28bed6c07bf171d552905c55829117715da
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix uninitialised fildes variables in libexec helpers
Reviewed and uncovered as part of the diff in the forthcoming commit
(pathlist API refactor).
ok stsp@
- Commit:
6771d4253a7655812f9e1b5f25d98d86ec416951
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
always cast ctype' is*() arguments to unsigned char
ok stsp@
- Commit:
c22ed3f5d5d97db3f1d8fc8c649537c9033136f9
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got clone -b' work for repositories which lack a HEAD reference
ok op@
- Commit:
9439b99a9a4c551109d11217916f1d5118ca556d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
avoid looping over SHA1Update() in got-fetch-pack; suggested by millert@
- Commit:
4231e6b557d72b2ae13ede2aecdd6391f271f25e
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-fetch-pack: fix wrong memmove length leading to dubious checksum failures
ok millert tracey
- Commit:
b6b86fd1b9828e38d59915e62fddce62952b8b75
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- Commit:
717a78d4f87c3704afe34c77e211349932575d5b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix snprintf error handling
follow the "proper secure idiom" described in the CAVEATS section of
printf(3). reminded by tb@ and millert@
- Commit:
406d5a24d29a81e1741aed65acc1f1000c44f0d3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
convert two snprintf to strlcpy
"looks good to me" millert@
- 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:
5d120ea8410ddc2808e476d554ba931dc19d8c50
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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
- Commit:
e9f1a409ccc66a6fb79a3022695ca78ad26972ea
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
imsg_add() frees its msg argument on error; avoid double-free in error paths
- Commit:
b637eb2e40befbfc982edebcdd992ca0add5defc
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
apply time-based rate-limiting to got-fetch-pack download progress output
- Commit:
97799ccd4b67a81f97039305d4fdd66588da9962
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
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.
- Commit:
35add24aa636945d591ac62534d3caf3e906621a
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
plug memory leaks in got-fetch-pack and got-send-pack
ok naddy
- Commit:
ea83355f0a329b34b741dffc0cd0542ed96afb9a
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
let 'got fetch' send all references to the server to avoid redundant downloads
Problem reported by naddy.
ok naddy
- Commit:
01bb5a15144ece7ca707994fb56e1847c76a1a92
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam@smoothwall.net>
- Date:
fix some integers that had a slightly wrong type; patch by Omar Polo
- Commit:
92a9e85d28a30997176ce0d3c2915e3ea70782c7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add FreeBSD support
This adds the capability to compile got-portable on FreeBSD.