fix(daemon): add native FreeBSD process-image identity and /home log-path alias - #1467
Open
PR9000 wants to merge 3 commits into
Open
fix(daemon): add native FreeBSD process-image identity and /home log-path alias#1467PR9000 wants to merge 3 commits into
PR9000 wants to merge 3 commits into
Conversation
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>
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)