Omar Polo
ca3d8bfde6
retroactively mention the fstat64 fix
2021-09-18 11:15:40 +00:00
Omar Polo
39c5bfd64b
fix changelog syntax
2021-09-18 11:09:36 +00:00
Omar Polo
b03b7d5bae
sync changelog
2021-09-17 16:17:16 +00:00
Omar Polo
f2478b332f
sync
2021-08-23 22:44:55 +00:00
Omar Polo
03747a6c51
sync
2021-07-29 07:54:41 +00:00
Omar Polo
2887c631ee
sync
2021-07-27 09:22:17 +00:00
Omar Polo
735336b21e
unbreak configless mode
...
An un-initialized field in the configless code path leads to a crash
on the first request.
2021-07-19 11:15:44 +00:00
Omar Polo
a7da55710e
sync
2021-07-13 11:43:07 +00:00
Omar Polo
8068d2ff33
tag v1.7.1
...
This version includes two bugfixes:
- use ${MAKE} to recursively call make
- fix the misleading example in the man page: macros name may not be
reserved words
Both bugs found and fixed by Anna “CyberTailor”, thanks!
2021-07-11 09:50:26 +02:00
Omar Polo
094bdacd40
sync
2021-07-11 09:48:29 +02:00
Omar Polo
b79b2d811b
tag v1.7
2021-07-10 09:22:19 +00:00
Omar Polo
9f075bd689
sync
2021-07-09 13:36:22 +00:00
Omar Polo
c39be742cf
parsing: bring lots of goodies from OpenBSD' parse.y
...
This allows to solve the problem with the \n in the grammar (before
two following macro declaration were treated as invalid. This also
brings in a nice `include' keyword.
2021-07-09 11:25:25 +00:00
Omar Polo
d19951cf03
rename mime MIME EXT' to
map MIME to-ext EXT'
...
With the newish automatic string concatenation, options like `mime'
that accepts two strings as parameter start to become ambiguous: which
strings gets concatenated? Instead of trying to document in the
manpage which argument(s) is subject to string concatenation, do the
concat always and introduce a separator. In the case of mime,
`to-ext' now acts as a separator to distinguish. While there, also
use a new keyword because it sounds better.
It's dead-easy to upgrade to the new configuration, possibly with some
sed magic, but for the moment the old `mime' form is preserved: (with
a warning!) Will be dropped in the next release.
2021-07-09 08:30:55 +02:00
Omar Polo
321341f6c0
add -T timeout to gg; don't let the regress test hang
2021-07-06 13:09:24 +00:00
Omar Polo
6edcfca97f
try to preserve as much as possible CFLAGS and LDFLAGS from env
...
but still try to autodetect with pkg-config if they aren't provided.
Passing CFLAGS/LDFLAGS from the command line will still override the
guessed ones.
2021-07-06 13:01:11 +00:00
Omar Polo
137def5ff4
reworked seccomp filter
...
* SECCOMP_AUDIT_ARCH extended to support more architectures
* relax fcntl policy: allow the syscall regardless of the flags
* wrap every syscall in a ifdef, and add some (statx, fcntl64, ...)
used in x86
Some bits were taken from dhcpcd[0], thanks!
#4 related
[0]: https://roy.marples.name/git/dhcpcd/blob/HEAD:/src/privsep-linux.c
2021-07-02 09:11:40 +00:00
Omar Polo
98f5217822
[config] concat two or more strings next to each others
2021-06-29 16:10:10 +00:00
Omar Polo
6b86655a10
don't require the strict order macro > options > servers
2021-06-29 12:42:44 +00:00
Omar Polo
f98e9045ae
add -D to define macros from the cmd line
2021-06-29 12:39:34 +00:00
Omar Polo
3b21cca385
allow to define macros in the config file
...
Macros can be defined at the top of the configuration file:
dir = "/var/gemini"
cert = "/etc/keys"
and re-used later, for example
server "foo" {
root "$dir/foo" # -> /var/gemini/foo
cert "$cert/foo.pem" # -> /etc/keys/foo.pem
}
2021-06-29 12:17:40 +00:00
Omar Polo
5777923bb0
use getopt_long, add --help as synonym of -h and -V/--version
2021-06-29 10:49:59 +00:00
Omar Polo
2c43dcceb6
document `log' option
2021-06-17 09:27:09 +00:00
Omar Polo
74f0778b9a
drop the dependency on lex by implementing yylex by ourselves
...
The actual implementation is based off doas' parse.y. This gave us
various benefits, like cleaner code, \ to break long lines, better
handling of quotes etc...
2021-06-16 14:43:16 +00:00
Omar Polo
c92b802b6a
add `param' keyword
2021-06-11 15:49:46 +00:00
Omar Polo
f740b61b03
more params from and send a custom list
2021-06-11 15:48:56 +00:00
Omar Polo
3a1bd9ab49
sync
2021-05-27 09:46:00 +00:00
Omar Polo
1eb3631d10
certificate generation (bugfix and improvement)
...
don't add gmid as organisation when generating the certificate, and
set the version to 3, so it's compatible with java/android clients.
Found by Gnuserland, thanks!
2021-05-12 17:37:22 +00:00
Omar Polo
84821dc0ac
sync
2021-05-09 18:31:18 +00:00
Omar Polo
419e32b05e
sync
2021-05-03 16:12:53 +00:00
Omar Polo
737a6b50c5
ensure %p (path) is always absolute
...
with the recent changes, sometimes the path may not start with a '/'.
This ensures that %s is ALWAYS an absolute path.
2021-04-30 19:07:37 +00:00
Omar Polo
fdea6aa0bc
allow ``root'' rule to be specified per-location block
2021-04-30 17:16:34 +00:00
Omar Polo
cc8c2901ad
added ``alias'' option to define hostname aliases for a server
2021-04-29 18:23:35 +00:00
Omar Polo
8e8b2e252c
pidfile support with `-P pidfile'
2021-04-28 12:45:22 +00:00
Omar Polo
9cc630aa63
added ``env'' option to define environment vars for CGI scripts
2021-04-28 12:43:17 +00:00
Omar Polo
e6ca8eb156
lower log priority for fatal errors from CRIT to ERR
...
found by Anna, thanks!
2021-04-28 12:43:17 +00:00
Omar Polo
11c986679a
sort the auto index alphabetically
2021-04-25 12:06:54 +00:00
Omar Polo
4d820b6cd2
use `text/x-patch' for .patch and .diff files
2021-04-21 07:51:29 +00:00
Omar Polo
b33425827e
print the datetime when logging to stderr
2021-04-14 14:52:47 +00:00
Omar Polo
89541eeec0
define TLS_VERSION, TLS_CIPHER and TLS_CIPHER_STRENGTH for CGI scripts
2021-04-13 06:59:54 +00:00
Omar Polo
b211d0f7d9
sync changelog
2021-04-12 21:13:51 +00:00
Omar Polo
b8e64ccd44
list instead of fixed-size array for vhosts and locations
...
saves some bytes of memory and removes the limit on the maximum number
of vhosts and location blocks.
2021-03-31 16:32:18 +00:00
Omar Polo
e0ebdf2d94
sync changelog
2021-03-31 13:58:31 +00:00
Omar Polo
33b455ada3
sync changes
2021-03-31 13:23:29 +00:00
Omar Polo
c836cdfadb
handle CGI scripts that replies with the maximum header length allowed
...
the 1024 bytes limits is for the META only, not for the whole
response. That means that the maximum size for the header line is
1029!
2021-03-29 09:42:06 +00:00
Omar Polo
c8249bada3
gmid v1.6 -- "Stargazers"
2021-03-20 12:04:23 +00:00
Omar Polo
7e3aaf3752
sync changelog
2021-03-20 08:54:03 +00:00
Omar Polo
ad5301d1a0
sync ChangeLog
2021-03-20 07:46:47 +00:00
Omar Polo
793835cb26
add `log on/off' to enable/disable logs per-location
2021-02-23 13:43:24 +01:00
Omar Polo
02be96c6dd
add `require client ca' rule to require certs signed by a CA
2021-02-09 22:30:04 +00:00
Omar Polo
b63e30ff44
define TLS_CLIENT_NOT_BEFORE/NOT_AFTER in CGI scripts
2021-02-07 21:47:01 +00:00
Omar Polo
9f006a2127
[cgi] split the query in words if needed and add them to the argv
2021-02-07 18:55:04 +00:00
Omar Polo
a709ddf5eb
added prefork option
2021-02-07 12:05:32 +00:00
Omar Polo
e3ddf39095
add the ``entrypoint'' option
2021-02-06 18:28:43 +00:00
Omar Polo
6abda252e9
added `block return'' and
`strip'' options
2021-02-06 17:22:37 +00:00
Omar Polo
8404ec301f
don't %-decode the query
2021-02-05 14:31:53 +00:00
Omar Polo
ca21e10043
reload configuration on SIGHUP
2021-02-04 13:23:15 +00:00
Omar Polo
87f2b68b58
cgi now follows globbing rules
2021-02-02 22:38:35 +00:00
Omar Polo
5f715ce43f
print the header in the directory listing
2021-02-02 09:48:32 +00:00
Omar Polo
38f8a798b1
mention v1.5
2021-02-01 12:30:34 +00:00
Omar Polo
e17642a7bb
require absolute paths in config file
2021-02-01 11:08:57 +00:00
Omar Polo
ee29b5a63b
sync
2021-01-31 11:09:15 +00:00
Omar Polo
e99923477a
sync
2021-01-30 12:13:49 +00:00
Omar Polo
dceca3b69d
sync
2021-01-29 17:29:21 +00:00
Omar Polo
3300cbe06a
initial punycode support
2021-01-27 10:47:49 +00:00
Omar Polo
a5d04ea066
sync
2021-01-25 14:31:40 +00:00
Omar Polo
145ba43e16
sync
2021-01-25 10:34:05 +00:00
Omar Polo
252908e6bb
added support for location blocks
2021-01-24 18:53:26 +00:00
Omar Polo
c8b7433918
added support for location blocks
2021-01-24 14:11:40 +00:00
Omar Polo
ba7b2faa86
sync
2021-01-24 09:55:19 +00:00
Omar Polo
0ac2dceccc
sync changes
2021-01-21 16:19:11 +00:00
Omar Polo
1213c735bf
sync
2021-01-21 09:17:19 +00:00
Omar Polo
6119e13e8a
moving "default type" from global options to server options
2021-01-19 11:28:41 +00:00
Omar Polo
05c23a54ea
add "lang" server option
2021-01-19 10:58:29 +00:00
Omar Polo
17b09e3cb7
add a dockerfile
2021-01-18 23:15:45 +00:00
Omar Polo
d89aa7630d
typo
2021-01-18 22:09:17 +00:00
Omar Polo
e7ecf9a528
sync
2021-01-18 21:53:36 +00:00
Omar Polo
7a11e8a5d3
sync changes
2021-01-17 09:43:29 +00:00
Omar Polo
bd726b55be
set SERVER_NAME to the vhost when executing CGI scripts
2021-01-15 19:23:43 +00:00
Omar Polo
5bc3c98ed4
add protocols to the config
2021-01-15 18:55:05 +00:00
Omar Polo
8696c5ea24
sync changes
2021-01-15 18:24:58 +00:00
Omar Polo
dafb57b8af
sandbox also on FreeBSD with capsicum
2021-01-15 14:03:45 +00:00
Omar Polo
6214c12719
added sample configuration
2021-01-15 09:31:52 +00:00
Omar Polo
1590277007
conf & vhosts
...
* gmid.c (main): changed behaviour: daemon off by default
(main): changed -c in -C (cert option)
(main): changed -k in -K (key option, for consistency with -C)
(main): added -c to load a configuration
(main): certs, key and doc (-C -K and -d) doesn't have a default value anymore
(handle_handshake): add vhosts support
2021-01-15 09:17:43 +00:00
Omar Polo
9939ddcf9d
sync changes
2021-01-13 19:03:21 +00:00
Omar Polo
7b1d979032
reject non-gemini protocols with 53
2021-01-11 14:45:57 +00:00
Omar Polo
85dff1f9c3
fix remote_user for CGI and add -6 flag to enable ipv6
2021-01-11 12:08:50 +00:00
Omar Polo
33756bd235
accept both ipv4 and ipv6
2021-01-10 22:56:33 +00:00
Omar Polo
709d6e5ead
log also the port of the client
2021-01-10 22:29:22 +00:00
Omar Polo
60ff035518
mention IRI in changelong
2020-12-26 10:15:16 +01:00
Omar Polo
4f12842dfe
mention change in changelog file
2020-12-21 14:40:04 +01:00
Omar Polo
d7802bb44a
logging reworked and daemonize by default
...
The -l option was removed: now it logs on syslog if -f (foreground) is
not passed.
2020-12-02 21:18:01 +01:00
Omar Polo
c603f1260d
fix bug introduced in last version regarding full URLs
...
gemini://example.com was incorrectly parsed.
2020-11-18 09:45:28 +01:00
Omar Polo
dd3895586f
mention the bugfix and tag 1.3.1
2020-11-18 09:36:18 +01:00
Omar Polo
ae2ad03ec0
handle //example.com urls
2020-11-18 09:32:07 +01:00
Omar Polo
721e232529
make port number configurable
2020-11-18 09:12:27 +01:00
Omar Polo
d431188c66
fixed changelog format for old entries
2020-11-10 18:14:07 +01:00
Omar Polo
a5d310bc0d
[cgi] added support for path parameters
...
enhance the CGI scripting support so that script can take path
parameters. That is, a script at /cgi/foo is called when the request
path is /cgi/foo/bar/...
This commit also introduce some backward incompatible changes as the
default env variables set for the CGI script changed.
2020-11-10 14:07:36 +01:00
Omar Polo
0ed5656795
documentation improvements
2020-11-06 18:11:45 +01:00
Omar Polo
aff8d19010
handle CGI concurrently
...
don’t stop-the-world-until-cgi-end, but rather poll on the script, so
we can handle other requests in the meantime.
2020-11-06 17:09:14 +01:00