Prepare for FreeBSD sandboxing support#13281
Merged
Ericson2314 merged 1 commit intomasterfrom May 27, 2025
Merged
Conversation
This is the utility changes from #9968, which were easier to rebase first. I (@Ericson2314) didn't write this code; I just rebased it. Co-Authored-By: Artemis Tosini <me@artem.ist> Co-Authored-By: Audrey Dutcher <audrey@rhelmot.io>
c15e014 to
625dce6
Compare
cole-h
reviewed
May 27, 2025
Comment on lines
+372
to
+378
| #ifdef __FreeBSD__ | ||
| #define MOUNTEDPATHS_PARAM , std::set<Path> &mountedPaths | ||
| #define MOUNTEDPATHS_ARG , mountedPaths | ||
| #else | ||
| #define MOUNTEDPATHS_PARAM | ||
| #define MOUNTEDPATHS_ARG | ||
| #endif |
Member
There was a problem hiding this comment.
Out of curiosity: is there a reason to do this ugly define stuff rather than making it std::option<std::set<Path>> or something similar?
Member
Author
There was a problem hiding this comment.
That would create a bunch of runtime failure modes. non-freebsd would have to assert it is not present, and freebsd would to assert it is present
Member
|
I think this may have broken the FreeBSD build: https://hydra.nixos.org/build/298336685 |
Member
Author
|
Oh, oops! It passed locally in shell but I see I forgot to |
Merged
cole-h
reviewed
Jul 11, 2025
| static bool b = (settings.buildUsersGroup != "" || settings.autoAllocateUids) && isRootUser(); | ||
| return b; | ||
| #elif defined(__APPLE__) | ||
| #elif defined(__APPLE__) && defined(__FreeBSD__) |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/critical-security-issue-in-nix-2-30-on-macos/66506/1 |
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.
Motivation
This is the utility changes from #9968, which were easier to rebase first.
Context
I (@Ericson2314) didn't write this code; I just rebased it.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.