caddy/internal
Francis Lavoie 0d1679a856
core: Retry privileged binds on EACCES instead of checking port < 1024 (#8253)
WithBindCapability assumed the kernel's privileged port range ends at
1024, but it is set by net.ipv4.ip_unprivileged_port_start, which can
be anywhere from 0 (Docker's default) to 65535. With a value above
1024, a non-root bind to e.g. :1500 failed even though the capability
was permitted.

Now listen is called normally first, and only if it fails with EACCES
on a TCP/UDP port, and CAP_NET_BIND_SERVICE is permitted but not
effective, the capability is raised and the bind retried. This also
skips raising it when the range starts lower than the port.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0e392c89ba)
2026-11-03 00:53:19 -05:00
..
filesystems events: Refactor; move Event into core, so core can emit events (#6930) 2025-03-29 08:15:43 -06:00
metrics
…
testmocks
…
bindcap_linux.go core: Retry privileged binds on EACCES instead of checking port < 1024 (#8253) 2026-11-03 00:53:19 -05:00
bindcap_linux_test.go core: Retry privileged binds on EACCES instead of checking port < 1024 (#8253) 2026-11-03 00:53:19 -05:00
bindcap_other.go core: Raise CAP_NET_BIND_SERVICE when binding privileged ports (#8102) 2026-11-03 00:52:58 -05:00
logbuffer.go logging: Adjustments to BufferedLog to keep logs in the correct order (#7257) 2025-09-15 09:29:50 -06:00
logmarshalers.go admin: Redact sensitive request headers in API logs (#7578) 2026-04-17 14:56:42 -06:00
logs.go internal: fix `MaxSizeSubjectsListForLog` off-by-one when `maxToDisplay` is `0` (#7970) 2026-09-26 18:51:36 +10:00
logs_test.go internal: fix `MaxSizeSubjectsListForLog` off-by-one when `maxToDisplay` is `0` (#7970) 2026-09-26 18:51:36 +10:00
ranges.go caddytls,caddyhttp: Placeholders for some TLS and HTTP matchers (#6480) 2024-08-07 11:02:23 -06:00
sockets.go
…