aboutsummaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2024-08-03add support for using the proxy protocol v1 when proxying tooOmar Polo
This is symmetrical to the support for *incoming* requests. The new regress case uses this to proxy to itself using the proxy-protocol v1. Fixes https://github.com/omar-polo/gmid/issues/31
2024-06-17add a proxy-v1 keyword to enable the proxy protocol handlingOmar Polo
2024-06-09check and error on strlcpy truncationOmar Polo
2024-06-06...complete the sentenceOmar Polo
2024-06-06fix previous; was causing a shift/reduce conflictOmar Polo
2024-06-06fix parser: empty lines are allowedOmar Polo
2024-06-05add a nice error message in case the `cgi' option is presentOmar Polo
was removed with gmid 2.0 but to ease the migration a friendly error message is more useful than a "syntax error".
2024-05-29pretty-print the socket address at configuration parsing timeOmar Polo
saves a getnameinfo(NI_NUMERICHOST) at runtime, even if it's pretty cheap.
2024-03-12remove dead codeOmar Polo
2024-01-30turn log styles into strings from yacc point of viewOmar Polo
having styles as reserved keywords means that variables / macros can't be called `common', `condensed', etc... which is not great and not obvious either. Instead, let's keep the log styles as strings and match on them. This also allows to have a slightly better error message in case of a typo. See: https://codeberg.org/op/gmid/issues/1
2024-01-30remove stray spaceOmar Polo
2024-01-26rework the grammar so that ; is accepted after variables and optionsOmar Polo
See Codeberg issue #1.
2024-01-11fix missing listen on warningOmar Polo
printed the wrong value for the hostname
2023-08-25plug a leakOmar Polo
all other rules are freeing the value of `listen_addr'
2023-08-25fix automatic guessing of `listen on'Omar Polo
default_host needs to be NULL for getaddrinfo(3) to listen on everything.
2023-08-08implement fastcgi strip numberOmar Polo
2023-08-07add `log syslog facility' to use a different syslog(3) facilityOmar Polo
Was requested ages ago by Karl Jeacle, now that there is some better support for configuring the logging there's no excuse to add this. It helps with filtering from syslog.d / syslog.conf.
2023-08-07sort logoptOmar Polo
2023-07-26add log syslog off; don't turn syslog off when log access is specifiedOmar Polo
2023-07-25typoOmar Polo
2023-07-25allow to change the logging style; introduce some new onesOmar Polo
add `log style <style>'; The old default is called `legacy' now, a new default format is added called `condensed', and `common' and `combined' to mimick Apache httpd and nginx (respectively) are also added.
2023-07-24add ability to log to files with log access <path>Omar Polo
2023-07-23fix a reduce/reduce conflictOmar Polo
location -> error and locopt -> fastcgi -> error both end up with a optnl that can be reduced to the empty string.
2023-07-23add `fastcgi off' to forceful skip fastcgi for a routeOmar Polo
2023-07-23revamp fastcgi configuration: make it per-locationOmar Polo
this revamps the syntax in the configuration to better match httpd(8) (and in general be less weird) and to allow per-location fastcgi configurations. the bare `param' is now deprecated, but for compatibility it acts like `fastcgi param' would do now. Same story for `fastcgi <pathÂ>'.
2023-07-23plug memleakOmar Polo
2023-06-29make `listen on' defaults on port 1965Omar Polo
2023-06-24copyright years++Omar Polo
2023-06-23fix `listen on *'Omar Polo
2023-06-23implement `listen on'Omar Polo
Listening by default on all the addresses is so bad I don't know why I haven't changed this before. Anyway. Add a `listen on $hostname port $port' syntax to the config file and deprecate the old "port" and "ipv6" global setting. Still try to honour them when no "listen on" directive is used for backward compatibily, but this will go away in the next next version hopefully. At the moment the `listen on' in server context don't filter the host, i.e. one can still reach a host from a address not specified in the corresponding `liste on', this will be added later.
2023-06-23remove the new_*() declarations that were moved to utils.cOmar Polo
2023-06-23use host->domain to report errors, $2 is free'dOmar Polo
2023-06-13fix the build with some yacc implementationsOmar Polo
2023-06-09move print_conf and make it take the config as argumentOmar Polo
2023-06-09use fatal/fatalx instead of err/errx in daemon codeOmar Polo
2023-06-09parse_conf: don't die on error, return -1Omar Polo
this avoids having the daemon dieing on SIGHUP with a bad config file.
2023-06-09don't have the config being a globalOmar Polo
2023-06-09move hosts into the config structOmar Polo
2023-06-09move fastcgi from global var to the config structOmar Polo
while here also make them a list rather than a fixed-size array.
2023-06-09readd proxy certs and `require client ca' supportOmar Polo
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-08keep cert/key/ocsp path as strings and don't send them via imsgOmar Polo
2023-06-08move some new_* functions from parse.y to utils.cOmar Polo
2023-06-08rework the daemon to do fork+execOmar Polo
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-06use fatal() in code used in the daemonOmar Polo
2023-06-06switch to the more usual log.cOmar Polo
2023-06-06rename PROC_MAX to PREFORK_MAXOmar Polo
2023-06-05provide a more usual fatalOmar Polo
fatal usually appends the error string. Add 'fatalx' that doesn't. Fix callers and move the prototypes to log.h
2023-05-08send capsicum/landlock/seccomp hack to ValhallaOmar Polo
2022-11-27don't crash when specifying fcgi UNIX sockets to connect toOmar Polo
2022-10-05remove the last tentacles of the hidden `span' fcgi featureOmar Polo