fix(daemon): add native FreeBSD process-image identity and /home log-path alias - #1467
fix(daemon): add native FreeBSD process-image identity and /home log-path alias#1467PR9000 wants to merge 3 commits into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
private_log_directory_path_copy shared the /home root-owned alias
between __APPLE__ and __FreeBSD__. macOS never needed /home resolved
in this security-sensitive step; split the alias list so Darwin keeps
{/tmp, /var} and only FreeBSD gains /home -> /usr/home.
Signed-off-by: Pedro Ramos <131530838+pr9000@users.noreply.github.com>
Extends runtime_process_image_reference_* (self/peer process image acquisition and comparison) to FreeBSD, previously guarded only for _WIN32/__APPLE__/__linux__. Uses sysctl(KERN_PROC_PATHNAME) to resolve a process's executable path without depending on procfs. Renames runtime_linux_stat_same_image to runtime_posix_stat_same_image now that the same comparison logic serves Linux, macOS, and FreeBSD. Signed-off-by: Pedro Ramos <131530838+pr9000@users.noreply.github.com>
Signed-off-by: Pedro Ramos <131530838+pr9000@users.noreply.github.com>
31a35bc to
d6f0196
Compare
|
Thank you for splitting the FreeBSD process-identity and log-path work into a focused change. Because this extends platform support and touches process identity and path handling, I have routed it to |
What does this PR do?
Adds native FreeBSD support to the daemon's process-image identity logic in
src/daemon/runtime.cand scopes a security-sensitive/homelog-path alias to FreeBSD only insrc/daemon/ipc.c.runtime_process_image_reference_acquire/_matches_processwere guarded only for_WIN32/__APPLE__/__linux__, with FreeBSD falling through to a stub that always returnedfalse. This broke the daemon's build-fingerprint capture and madeinstallrefuse to proceed on FreeBSD ("active CBM sessions and operations could not be stopped safely"). Adds asysctl(CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, pid)-based FreeBSD branch, mirroring the existing macOS/Linux pattern, and renamesruntime_linux_stat_same_imagetoruntime_posix_stat_same_imagenow that the comparison logic serves all three platforms.private_log_directory_path_copypreviously shared the/homeroot-owned alias between__APPLE__and__FreeBSD__. macOS never needed/homeresolved in this security-sensitive step; the alias list is now split so Darwin keeps{/tmp, /var}and only FreeBSD gains/home -> /usr/home.Split out of #1138 per review feedback — this covers the daemon-side platform port; CLI self-path resolution and the
activation_transaction.cguard fix are in separate PRs.Checklist
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)