Commits


portable: fix getopt check Rather than always asserting our version of getopt(2), only do so if it lacks certain features. Some of the configure.ac changes have come from openssh-portable.


portable: improve b64_ntop detection When looking for base64 functions, check -lresolv and/or -lnetwork, and only build those in compat if required. Some of the detection code was modified from tmux's configure.ac script.


portable: configure: split out dependencies Rather than assume all dependencies are required for all programs, split them out. This will make packaging easier, as well as splitting the code to use subprojects. Note that due to the use of config.h semantics, in most cases the got_compat.h header file is now at the top of the .c file it is included in, so that it can handle the system header inclusion properly.


portable: compat: sha2 Add compatability support for sha2 for systems which don't natively have it. This has been stolen from OpenBSD. Thanks!


portable: OpenBSD support Despite -portable existing to make the codebase compile on platforms other than OpenBSD, there's nothing wrong with making -portable still compile on that platform as well.


portable: remove sys/tree.h compat inclusion libbsd as a library was created some years back to pull together BSD-specific functionality to be used on non-BSD systems. When it was in its infancy, and not being widely adopted across non-BSD systems, there was often a need to carry around compat versions of sys/{queue,tree}.h This is no longer the case -- and the compat code for this has never worked on systems which lacked a compatible sys/tree.h header anyway, so remove this, and let the user know that libbsd is needed. A few people have mentioned this to me.


portable: add setproctitle This is needed for gotwebd.


portable: add siphash implementation Siphash is being used in place of murmurhash for object-id set as this is faster. However, this isn't really seen much in the non-BSD userspace, so provide an implementation for it portably, if one isn't found.


portable: support NetBSD This adds support for NetBSD, using the following external dependencies: libuuid ncursesw There is no CI (yet) as enabling that on Cirrus-CI requires some work, so for now, these builds will be run manually before releases. The test suite will also need tweaking to be fully supported but the key tests are supported for now.


portable: include support for MacOS This adds support for MacOS (Monteray onward, although should work on older MacOSes). The BSD wrapper for poll/ppoll has been lifted from the work the folks over at OpenSSH have done -- thanks!


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.


portable: propagate AM_CFLAGS/AM_CPPFLAGS Allow for warnings via AM_CFLAGS in a common Makefile, and let those values propagate to all other Makefiles. Currently the more useful checks are disabled until upstream changes are made to reduce warnings. While here, also fix the version string to remove quotes.


portable: compat: remove unused files Fix up a weird automerge where some files referenced are either not used any more or have already been included.


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


libexec: honour libeexec path for helpers libexec is a common path which is understood by autotools, and should be honoured. Patch from Christian "naddy" Weisgerber


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


compat: Makefile: add missing trailing backslash The uuid.c source file was missing a trailing backslash.


dist: rework files for distcheck Rather than having a toplevel EXTRA_DIST target in the toplevel Makefile.am file, move the relevant files to their own Makefile.am locations.


xmalloc: remove wrapper as no longer needed There is only one user which calls xrecallocarray: ibuf_realloc(). We already provide recallocarray() in the compat layer so ibuf_realloc() can simply call recallocarray() directly, as it does on OpenBSD. OK thomas.adam


automake: Fix path to libexec directory The got_lib_privsep.h header expects the path to the libexec directory to be called GOT_LIBEXECDIR. At the moment it always falls back to using /usr/libexec. Fix what looks to be a typo.


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