mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 20:26:05 -05:00
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>
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
# ==========================================================================
|
|
#
|
|
# ZoneMinder Stream Socket Configuration
|
|
#
|
|
# ==========================================================================
|
|
#
|
|
# Settings for the per-monitor media stream sockets
|
|
# (ZM_PATH_SOCKS/stream_{monitor_id}.sock) served by zmc.
|
|
#
|
|
# *** DO NOT EDIT THIS FILE ***
|
|
#
|
|
# To make custom changes to the variables below, create a new configuration
|
|
# file, with an extension of .conf, containing your desired modifications.
|
|
#
|
|
|
|
# Group ownership applied to the stream socket files. Sockets are created
|
|
# with mode 0660, so members of this group can consume monitor media without
|
|
# running as the web user. Leave empty to keep the default group.
|
|
ZM_STREAM_SOCKET_GROUP=@ZM_WEB_GROUP@
|
|
|
|
# Optional comma-separated list of numeric user ids allowed to connect to
|
|
# the stream sockets, verified with kernel peer credentials (SO_PEERCRED on
|
|
# Linux, getpeereid on the BSDs and macOS). Empty allows any user that
|
|
# passes the filesystem permissions.
|
|
ZM_STREAM_SOCKET_ALLOWED_UIDS=
|
|
|
|
# Maximum number of simultaneous consumers per monitor stream socket.
|
|
ZM_STREAM_SOCKET_MAX_CLIENTS=8
|
|
|
|
# Per-consumer outgoing queue limits. When a slow consumer's queue is full
|
|
# the oldest media messages are dropped for that consumer only; the loss is
|
|
# reported through sequence number gaps and STATS messages.
|
|
ZM_STREAM_SOCKET_QUEUE_BYTES=8388608
|
|
ZM_STREAM_SOCKET_QUEUE_MSGS=256
|
|
|
|
# Disconnect a consumer that has accepted no data for this many seconds
|
|
# while its queue is full.
|
|
ZM_STREAM_SOCKET_STALL_SECS=10
|