Commit Graph

20 Commits

Author SHA1 Message Date
Omar Polo 42235e3fc2 add a test for the config dumping 2024-04-04 13:07:09 +00:00
Omar Polo a84492b75f ge->gemexp forgotten in previous 2023-07-25 20:27:31 +00:00
Omar Polo 471a5250e3 rename ge -> gemexp in regress too 2023-07-25 20:26:26 +00:00
Omar Polo 60b4efa1e2 add a test for the file logging 2023-07-24 08:51:35 +00:00
Omar Polo 60f4107da6 add a test with fastcgi, locations and forceful disabling 2023-07-23 19:04:53 +00:00
Omar Polo fdd67729b4 adjust syntax in fastcgi test; add another test for the old syntax 2023-07-23 18:45:43 +00:00
Omar Polo 57ee9057af add some ideas 2023-07-01 14:11:21 +00:00
Omar Polo 9adeb26579 re-establish fastcgi test 2023-06-09 10:46:50 +00:00
Omar Polo deadd9e131 readd proxy certs and `require client ca' support
Was temporarly disabled during the transition to real privsep.
While here, fix a memory leak when using `require client ca'.

Also, avoid leaking info about the parent address space layout to
server processes by not sending pointer values.
2023-06-09 09:28:26 +00:00
Omar Polo 797c4609a9 make ge work again 2023-06-08 16:22:03 +00:00
Omar Polo c26f2460e4 rework the daemon to do fork+exec
It uses the 'common' proc.c from various OpenBSD-daemons.

gmid grew organically bit by bit and it was also the first place where I
tried to implement privsep.  It wasn't done very well, in fact the
parent process (that retains root privileges) just fork()s a generation
of servers, all sharing *exactly* the same address space.  No good!

Now, we fork() and re-exec() ourselves, so that each process has a fresh
address space.

Some features (require client ca for example) are temporarly disabled,
will be fixed in subsequent commits.  The "ge" program is also
temporarly disabled as it needs tweaks to do privsep too.
2023-06-08 13:59:31 +00:00
Omar Polo a4180f1d0b disable test_unknown_host temporarly
breaks on some distro and needs further investigations; it's not that
interesting fortunately.
2022-10-31 22:53:16 +00:00
Omar Polo a5fb2593a9 adjust regress to use `ge' for the old configless test 2022-09-08 20:45:12 +00:00
Omar Polo d29a2ee224 get rid of the CGI support
I really want to get rid of the `executor' process hack for CGI scripts
and its escalation to allow fastcgi and proxying to work on non-OpenBSD.

This drops the CGI support and the `executor' process entirely and is
the first step towards gmid 2.0.  It also allows to have more secure
defaults.

On non-OpenBSD systems this means that the sandbox will be deactivated
as soon as fastcgi or proxying are used: you can't open sockets under
FreeBSD' capsicum(4) and I don't want to go thru the pain of making it
work under linux' seccomp/landlock.  Patches are always welcome however.

For folks using CGI scripts (hey, I'm one of you!) not all hope is lost:
fcgiwrap or OpenBSD' slowcgi(8) are ways to run CGI scripts as they were
FastCGI applications.

fixes for the documentation and to the non-OpenBSD sandboxes will
follow.
2022-09-06 16:11:09 +00:00
Omar Polo fb1212266f add tests for the type block 2022-02-26 14:02:45 +00:00
Anna “CyberTailor” 1ca7a0f3bf don't skip unit tests when SKIP_RUNTIME_TESTS is set
IRI and Punycode tests don't run gmid binary and can be safely executed.
2022-02-03 11:13:41 +01:00
Omar Polo 901905e0cf bail out of client_read if we've already decide what to do
libevent2 can still somehowe call client_read even in code paths
that never enable reading from the evbuffer.  Can't reproduce on
the libevent in base on OpenBSD.  It's a bit ugly, but it's a small
workaround for something that otherwise *always* make gmid crash
when linked against libevent2.  (client_read works under the
assumption that c->host != NULL, matched_proxy crashes otherwise.)
2022-01-05 18:58:01 +00:00
Omar Polo c064f3de1d add proxying with client certificate test 2022-01-01 16:33:44 +00:00
Omar Polo 4b5b1e82a9 add a test for the `proxy relay-to' rule 2021-12-29 20:36:54 +00:00
Omar Polo e5285d5422 rename `runtime' to `regress'
while there also kill an unused rule `regress', it's now redundant since
all the tests are run together.
2021-12-09 20:06:38 +01:00