1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-07 17:47:14 +00:00

Reject empty listening addresses

Using an empty listening address will result in chasquid listening on a
random port, which is a dangerous misconfiguration.

That is most likely done to prevent it from listening at all.

To prevent this misconfiguration, explicitly reject empty listening
addresses early and with a warning, so there is no ambiguity.

Users can still prevent chasquid from listening by just commenting out
the entry in the config (and not passing any systemd file descriptors).

See https://github.com/albertito/chasquid/issues/45 for more details and
discussion, including alternatives considered.

Thanks to xavierg who reported this via IRC.
This commit is contained in:
Alberto Bertogli
2023-12-02 14:50:17 +00:00
parent d93d7cae10
commit dbff2f0455
5 changed files with 15 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ mkdir -p c-04-no_cert_dirs/certs/
# Generate certs for the tests that need them.
for i in c-05-no_addrs c-06-bad_maillog c-07-bad_domain_info \
c-08-bad_sts_cache c-09-bad_queue_dir ;
c-08-bad_sts_cache c-09-bad_queue_dir c-10-empty_listening_addr ;
do
CONFDIR=$i/ generate_certs_for testserver
done