Commit Graph
16 Commits
Author SHA1 Message Date
Steve GilvarryandClaude Fable 5.1 edd4dec3c4 feat: check stream socket peer credentials with getpeereid on the BSDs and macOS
CheckPeer only knew SO_PEERCRED, so on platforms without it the
ZM_STREAM_SOCKET_ALLOWED_UIDS allow-list was silently ignored and every
client was logged as uid 0 pid 0. Use getpeereid where it exists (the
BSDs and macOS report no pid), and warn once per connection on any other
platform that the allow-list cannot be enforced.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 05:12:43 +10:00
SteveGilvarryandClaude Fable 5 00d042a374 feat: add zm.conf settings for stream socket permissions and limits
New conf.d/03-stream-socket.conf settings, parsed into staticConfig:

- ZM_STREAM_SOCKET_GROUP: group ownership of the 0660 socket files,
  defaults to the web group, letting a dedicated consumer user be
  granted access by group membership
- ZM_STREAM_SOCKET_ALLOWED_UIDS: optional SO_PEERCRED uid allow-list
- ZM_STREAM_SOCKET_MAX_CLIENTS / QUEUE_BYTES / QUEUE_MSGS / STALL_SECS:
  per-consumer queue bounds and stall disconnect threshold

These are deployment-level settings, so they live in conf.d alongside
ZM_PATH_SOCKS rather than in the Config table. Consumed by the
StreamSocket class added in the next commit.

Tests: full ctest suite (98 tests) passes at the branch head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-16 05:00:44 +10:00
Isaac Connor d10335f83a Merge pull request #3792 from Simpler1/patch-7
Fix(uname): Copy/paste typo in comment
2023-12-07 10:08:30 -05:00
Simpler1 dc71acb1e3 Fix(uname): Copy/paste typo in comment 2023-12-06 22:08:46 -05:00
Isaac Connor 27744a9bc8 ADD ZM_PATH_IP and ZM_PATH_IFCONFIG 2023-09-28 13:31:57 -04:00
Isaac Connor cc773eae43 Add ZM_PATH_RM and ZM_PATH_UNAME to config. 2023-09-28 12:58:43 -04:00
Alejandro Criado-Pérez 6fd119157a Text corrections 2023-08-27 02:00:59 +02:00
Isaac Connor b1ed56fbec Add ZM_PATH_API setting 2023-03-24 10:39:34 -04:00
Isaac Connor f3b5ed5f7e Fix empty PATH_FFMPEG. 2022-05-12 12:38:25 -04:00
Isaac Connor 4c5f5b0af0 Add ZM_PATH_FFMPEG to 01-system-paths.conf 2022-05-04 12:57:39 -04:00
Isaac Connor 2c23e18ea0 Add system path for arp-scan 2022-02-07 12:33:05 -05:00
Isaac Connor 06a521e30e populate ZM_PATH_SHUTDOWN 2020-08-10 12:02:42 -04:00
Andrew Bauer 3258d8e590 remove ZM_DIR_IMAGES (#2374) 2018-12-29 09:52:58 -05:00
Andrew Bauer 3dc424282b Support quoting config variables (#2175)
* allow handling of quotes in config files

* copy paste error

* surround zm_arptool in quotes
2018-08-11 12:56:16 -04:00
Andrew Bauer 4bca799d43 reorganize zm config files (#1937)
* reogranize config files

* process 01-system-paths.conf.in

* exclude .in files in install directive
2017-07-17 09:11:36 -04:00
Andrew Bauer 2bc6f1627e Add support for conf.d subfolder (#1902)
* cmake changes to support conf.d

* php changes to support conf.d

* perl changes to support conf.d

* C changes to support conf.d

* add conf.d support to rpmspecfile

* fix typo

* specify ZM_CONFIG_SUBDIR in relevant target distros

* put back my config_file perl definition

* remove quotes from ZM macros

* fix snprintf

* add README to conf.d folder

* adjust rpm specfile

* remove custom permissions from README in rpmspecfile

* modify rpm README documentation to reflect conf.d support

* set ZM_CONFIG_SUBDIR in debian rules file
2017-06-05 16:39:19 -04:00