-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
lowdown: disable sandbox on x86_64-darwin #346933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cda0a13
to
de8f2d2
Compare
If you’re happy with my approach, then I’d personally prefer it over this PR. I just didn’t want to rush a self‐merge, though it does already have an approval. I don’t mind this PR as a stop‐gap, either, since it’s already doing the bad thing on |
Since you got approvals for your approach, I went ahead and committed it. |
This is a program written in a memory‐unsafe language that processes potentially‐untrusted user input. We shouldn’t disable upstream’s sandboxing mechanisms for all downstream consumers without good reason. Although the sandbox API is officially marked as deprecated, it is used as the basis for the supported App Sandbox and it is extremely unlikely to ever be removed as it is used extensively throughout the OS for service hardening and by third parties like the Chrome sandbox. Nix itself uses it to sandbox builds, and its lack of support for nesting is why this caused problems in the first place. Instead, introduce a `lowdown-unsandboxed` package that can be used in the `nativeBuildInputs` of Nix builds, while keeping the sandboxed version of the program for general use. The name might not be ideal, as it remains identical to `lowdown` on non‐Darwin platforms, but I couldn’t think of a better one. See: NixOS#125004 Closes: NixOS#346933
After #346043, lowdown will also try to use the sandbox on x86_64-darwin, which won’t work. It fixes the following error in
installCheckPhase
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.