aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-26tag 1.8.2 -- "Lightbulb Sun" bugfix release1.8.2Omar Polo
gmid 1.8.2 "Lightbulb Sun" bugfix release ========================================= Released March 26, 2022. signify(1) pubkeys for this release: RWTy3UJQzpxBUAymBwb2EGLLm0b3H/1n8hzhaC9HYFYzNuTavGt9QSwC Bug Fixes ~~~~~~~~~ * fix a CGI timing issue: if a connection handled by a CGI scripts is interrupted with the right timing it causes the server process to exit with "fatal in client_by_id: invalid id X". New Features ~~~~~~~~~~~~ * add a new block `type { ... }' to define mime types mapping. Improvements ~~~~~~~~~~~~ * use shell built-in `command' instead of which(1), prodded by cage and Allen Sobot. * configure script: allow to set MANDIR from cmdline (Allen Sobot) * add systemd-sysusers sample file in contrib/ (Nakaya) * [linux/seccomp] allow fstatat64(2), llseek(2) and sigreturn(2), needed by glibc on armv7. (Tobias Berger) * [linux/seccomp] tightens rules by allowing openat(2) only with the O_RDONLY flag.
2022-03-26bump MdocdateOmar Polo
2022-03-26add target `test' alias for `regress'Omar Polo
2022-03-26swap try_client_by_id with client_by_idOmar Polo
i.e. allow client_by_id to fail and return NULL. Initially I thought it was a good idea to shut down a server process if we receive an invalid client id as reply from one of our requests to the executor process. This turned out not to be correct since a client can (read: will) disconnect in the delay beteewn we acknowledge their request and the cgi script execution. The fastcgi and proxy handler already handled this situation, so they're unaffected. This allows an attacker to make gmid unresponsible by just making enough requests until they hit the right timing.
2022-03-26move to a different serverOmar Polo
2022-03-26break out if check_reply failsOmar Polo
it's not a problem when we have only one check_reply at then end, since $? is kept across function boundaries, but when we have multiple checks we need to quit on the first error.
2022-03-19sync imsg-buffer.cOmar Polo
original commit from eric@: change the barrier so that fd's are always passed and received with the first byte of the imsg they belong to. idea, tweaks and ok claudio@
2022-03-19sync recallocarary.cOmar Polo
original commit from claudio@: Type-cast getpagesize() from int to size_t for the comparison with d. getpagesize() will only return positive numbers (there is no negative page size system) and it can not fail. Should fix some compiler warnings seen in -portable projects. OK otto@
2022-03-19const-ify some tablesOmar Polo
matches found with % grep -R '=[ ]*{' . | fgrep -v const
2022-03-18get rid of `which` in the configure tooOmar Polo
should have been done already in 12fcba2; reminded by Allen Sobot, thanks!
2022-03-18configure: allow to set MANDIR from argsOmar Polo
diff by Allen Sobot (chilledfrogs at disroot dot org), thanks!
2022-03-09mention gmid.sysusers in contrib together with gmid.serviceOmar Polo
related to github issue #14
2022-03-09add missing newlineOmar Polo
2022-03-09add description about systemd-sysusers on quickstartNakaya
2022-03-09add systemd-sysusers' config fileNakaya
2022-02-27use shell built-in `command' instead of which(1)Omar Polo
it's specified by POSIX AFAIK and requires less redirections.
2022-02-26fix emailOmar Polo
2022-02-26sync changelogOmar Polo
2022-02-26document the type { ... } blockOmar Polo
2022-02-26add tests for the type blockOmar Polo
2022-02-26add type { ... } block to define mime types mappingOmar Polo
The `map' rule is powerful but quite annoying to use if you have/need lots of entries (and clutters the configuration file too.) The `type' block is blatantly stolen from httpd(8) and allows for a way more nice usage: type { include "/usr/share/misc/mime.types" } or even type { text/markdown md markdown text/x-perl pl pm # ... }
2022-02-26add missing token include to the list of tokensOmar Polo
2022-02-19don't log errno, it's always zero after libtls returnsOmar Polo
The libevent error value is much more interesting! see github issue #13
2022-02-18remove paragraph "locally installed libressl" + some tweaksOmar Polo
libtls is now widely available, it's at least on gentoo, arch, void, alpine, fedora and debian sid; there's no need to show how to compile to a locally installed one.
2022-02-13sync changelogOmar Polo
2022-02-13tightens seccomp filter: allow only openat(O_RDONLY)Omar Polo
be more strict and allow an openat only with the O_RDONLY flag. This is kind of redundant with landlock, but still good to have. Landlock is not yet widely available and won't kill the process upon policy violation; furthermore, landlock can be disabled at boot time. tested on GNU and musl libc on arch and alpine amd64.
2022-02-13sort syscalls in seccomp filterOmar Polo
2022-02-13sync changelogOmar Polo
2022-02-13Allow Arch-Armv7 syscalls in sandbox.cTobias Berger
2022-02-10update the site for the releaseOmar Polo
2022-02-10sync changelogOmar Polo
2022-02-10tag 1.8.1 -- "Lightbulb Sun" bugfix release1.8.1Omar Polo
gmid 1.8.1 "Lightbulb Sun" bugfix release ========================================= Released Feb 10, 2022. signify(1) pubkeys for this release: RWTy3UJQzpxBUAymBwb2EGLLm0b3H/1n8hzhaC9HYFYzNuTavGt9QSwC Bug fixes --------- * fix landlock usage on linux: don't assume that access capabilities not listed are implicitly denied, because they are not. Mickaël Salaün, the landlock author, found the same error on game of trees: > In a nutshell, the ruleset's handled_access_fs is required for > backward and forward compatibility (i.e. the kernel and user space may > not know each other's supported restrictions), hence the need to be > explicit about the denied-by-default access rights. In practice this affects only linux and only partially: thanks to the design of the daemon and the seccomp filter the effects of this mistake in handling landlock are fortunately limited. However, in theory at least, gmid could be for e.g. tricked into truncating existing files, so it's highly suggested to update. Improvements ------------ All by Anna “CyberTailor”, thanks! * don't skip unit tests when SKIP_RUNTIME_TEST is set * add `gg' to the regress target dependencies * fix the "implicit declaration of asprintf" warning * sync vim syntax
2022-02-10fix landlock usageOmar Polo
Mickaël Salaün, the landlock author, pointed out the same error on the got implementation. The assumption that not listed access capabilities are implicitly denied is completely wrong: > In a nutshell, the ruleset's handled_access_fs is required for > backward and forward compatibility (i.e. the kernel and user space may > not know each other's supported restrictions), hence the need to be > explicit about the denied-by-default access rights.
2022-02-03sync vim syntaxAnna “CyberTailor”
2022-02-03include gmid.h before other headers to get all the prototypesAnna “CyberTailor”
> implicit declaration of function 'asprintf'; did you mean 'vsprintf'?
2022-02-03add gg to `make regress` dependenciesAnna “CyberTailor”
2022-02-03typoAnna “CyberTailor”
2022-02-03don't skip unit tests when SKIP_RUNTIME_TESTS is setAnna “CyberTailor”
IRI and Punycode tests don't run gmid binary and can be safely executed.
2022-02-03start new release cycleOmar Polo
2022-01-30prepare 1.8 release1.8Omar Polo
2022-01-30add changelog for 1.8Omar Polo
2022-01-30install gg tooOmar Polo
2022-01-30fix gg -P flag description: the `:' is in the optional partOmar Polo
2022-01-30posixify lib.sh: use = instead of == for test(1)Omar Polo
2022-01-30typoOmar Polo
2022-01-30sync changelogOmar Polo
2022-01-30rename MIME section to "MEDIA TYPES"Omar Polo
2022-01-30allow using a custom hostname for SNI during proxyingOmar Polo
add a `sni' option for the `proxy' block: the given name is used instead of the one extracted by the `relay-to' rule.
2022-01-28define TREE to shorten some url a bitOmar Polo
for the time being keep the https:// url, gmnigit renames file without extension to .txt (i.e. Dockerfile -> Dockerfile.txt) so linking via gemini is broken :/
2022-01-28only memcpy into imsg->data if datalen is not zeroOmar Polo
Passing a NULL pointer to memcpy is UB no matter if len is 0 (commit by claudio@, backporting for gmid.)