[Midnightbsd-cvs] [MidnightBSD/src] 50e595: prowld/prowlctl: enforce IPC peer credentials and ...
Lucas Holt
noreply at github.com
Sat Apr 18 11:58:23 EDT 2026
Branch: refs/heads/feature/prowl
Home: https://github.com/MidnightBSD/src
Commit: 50e595feb5016dabd9b962d91d0da8f5508e7c6c
https://github.com/MidnightBSD/src/commit/50e595feb5016dabd9b962d91d0da8f5508e7c6c
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-04-18 (Sat, 18 Apr 2026)
Changed paths:
M sbin/prowlctl/prowlctl.c
M sbin/prowld/ipc.c
Log Message:
-----------
prowld/prowlctl: enforce IPC peer credentials and sanitize client input
ipc.c:
- Capture peer uid/gid via getpeereid(2) in ipc_accept(); reject
connections where credential fetch fails.
- Cache the wheel group GID at startup via getgrnam("wheel") in
ipc_init(); chown the socket to root:wheel after bind+chmod.
- Add ipc_get_client(), ipc_peer_is_root(), ipc_peer_can_query()
helpers.
- In ipc_dispatch_message(), gate read-only verbs (list/status/show)
to wheel members and root; require root for all state-changing verbs.
prowlctl.c:
- Add validate_label_input() mirroring server-side label_valid(): only
alphanumerics, dots, hyphens, underscores; no leading dot; no "..".
- Validate user-supplied label argument in do_status() and
do_simple_target() before embedding it in snprintf JSON construction.
- Validate --type=TYPE filter in do_list() for the same reason.
AI-Assisted-by: Claude Sonnet 4.6
Signed-off-by: Lucas Holt <luke at foolishgames.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list