summaryrefslogtreecommitdiff
path: root/accel-pppd/cli/cli.h
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-06-04 17:43:25 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-06-04 17:45:50 +0300
commit5fc07183e90b5ce7c9d3ede955266ba575388965 (patch)
treeb514bfd84fe63b05bbdd57f0bba97a4c6280d0e0 /accel-pppd/cli/cli.h
parent8494d63943e69e2f7217ca401f6b9ba46b44cca8 (diff)
downloadaccel-ppp-5fc07183e90b5ce7c9d3ede955266ba575388965.tar.gz
accel-ppp-5fc07183e90b5ce7c9d3ede955266ba575388965.zip
log_file: don't register general target when log-file is unset
The general log target was registered unconditionally in init(), even when no log-file= option was configured. The backing log_file pointer is only allocated when the option is present, so the first general-routed log message dereferenced NULL in queue_log() (spin_lock(&NULL->lock)), crashing the daemon. This made commenting out log-file= a foot-gun. Guard the registration on log_file being allocated, mirroring how the fail/per-user/per-session targets are already conditional. Also bail out of general_reopen() early when log-file is unset, so a SIGHUP after a config reload that dropped log-file can't call open(NULL, ...).
Diffstat (limited to 'accel-pppd/cli/cli.h')
0 files changed, 0 insertions, 0 deletions