[Midnightbsd-cvs] [MidnightBSD/src] 590686: prowld: implement prowld.conf parsing via libucl

Lucas Holt noreply at github.com
Sat Apr 18 15:37:37 EDT 2026


  Branch: refs/heads/feature/prowl
  Home:   https://github.com/MidnightBSD/src
  Commit: 590686647f6a83a18d84f1a331e81182d1c58d93
      https://github.com/MidnightBSD/src/commit/590686647f6a83a18d84f1a331e81182d1c58d93
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-18 (Sat, 18 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.c
    M sbin/prowld/prowld.conf.sample

  Log Message:
  -----------
  prowld: implement prowld.conf parsing via libucl

Replace the load_config() stub with a full UCL parser implementation:

- Parse /etc/prowld/prowld.conf on startup and on SIGHUP reload.
- Apply the same file-trust checks used for unit files: config must be
  owned by root and not world-writable; otherwise log a warning and
  fall back to compiled-in defaults.
- max_concurrent_starts: accepts an integer >= 0 or the string "auto"
  (both map to 0, which lets dag.c auto-size to ncpu*2).
- shutdown_timeout: integer > 0 seconds; values <= 0 are rejected with
  a warning and the default (300 s) is kept.
- debug: boolean; config file can enable debug logging, but the
  command-line -d flag always takes precedence (OR semantics).

Fix ordering bug: g_config.debug was set from argv BEFORE load_config()
which then reset it to false.  Moved the argv debug assignment to after
load_config() so -d cannot be silently cleared by the config file.

Add #include <ucl.h> to prowld.c and document the debug key in
prowld.conf.sample.

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