https://gitlab.synchro.net/main/sbbs/-/commit/104fd115e6017024883be3a2
Modified Files:
src/sbbs3/sbbscon.c
Log Message:
sbbscon: no low-port bind warning when sbbs has CAP_NET_BIND_SERVICE
sbbs started as a non-root user always logged "!Started as non-root
user (id N): May fail to bind TCP/UDP ports below 1024", even when the executable carries the cap_net_bind_service file capability, the
documented way to run as a normal user ('make setcap', install-sbbs.mk),
in which case every low port binds. capabilities_set, which suppressed
the warning, is only set on the start-as-root path.
On Linux, read the effective capability set from /proc/self/status and,
when CAP_NET_BIND_SERVICE is present, log that at LOG_INFO instead of
the warning. Reading /proc rather than calling libcap keeps the check in
builds made without the libcap headers (USE_LINUX_CAPS undefined), which
can still be given the file capability.
The warning that remains loses its '!' error marker: it is logged at LOG_WARNING.
Fixes #1450
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net