caddy/internal
Francis Lavoie 0e392c89ba
Some checks are pending
Tests / test (./cmd/caddy/caddy, ~1.26.0, macos-14, 0, 1.26, mac) (push) Waiting to run
Tests / test (./cmd/caddy/caddy, ~1.26.0, ubuntu-latest, 0, 1.26, linux) (push) Waiting to run
Tests / test (./cmd/caddy/caddy.exe, ~1.26.0, windows-latest, True, 1.26, windows) (push) Waiting to run
Tests / test (s390x on IBM Z) (push) Waiting to run
Tests / goreleaser-check (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, aix) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, darwin) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, dragonfly) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, freebsd) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, illumos) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, linux) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, netbsd) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, openbsd) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, solaris) (push) Waiting to run
Cross-Build / build (~1.26.0, 1.26, windows) (push) Waiting to run
Lint / lint (push) Waiting to run
Lint / lint-1 (push) Waiting to run
Lint / lint-2 (push) Waiting to run
Lint / govulncheck (push) Waiting to run
Lint / dependency-review (push) Waiting to run
OpenSSF Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
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>
2026-10-19 19:19:28 +10:00
..
filesystems events: Refactor; move Event into core, so core can emit events (#6930) 2025-03-29 08:15:43 -06:00
metrics
testmocks caddytls: verifier: caddyfile: re-add Caddyfile support (#6127) 2024-02-26 00:13:48 +03:00
bindcap_linux.go core: Retry privileged binds on EACCES instead of checking port < 1024 (#8253) 2026-10-19 19:19:28 +10:00
bindcap_linux_test.go core: Retry privileged binds on EACCES instead of checking port < 1024 (#8253) 2026-10-19 19:19:28 +10:00
bindcap_other.go core: Raise CAP_NET_BIND_SERVICE when binding privileged ports (#8102) 2026-10-03 19:10:02 +10: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 ci: Use gofumpt to format code (#5707) 2023-08-07 19:40:31 +00:00