-
Notifications
You must be signed in to change notification settings - Fork 371
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
Make the macOS sandbox stricter to workaround a macOS bug (fixes #4389) #4797
Draft
kit-ty-kate
wants to merge
2
commits into
ocaml:master
Choose a base branch
from
kit-ty-kate:relax-sandbox-macos
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
kit-ty-kate
changed the title
Relax the macOS sandbox (fixes #4389)
Make the macOS sandbox stricter to workaround a macOS bug (fixes #4389)
Aug 12, 2021
kit-ty-kate
force-pushed
the
relax-sandbox-macos
branch
from
August 12, 2021 10:46
111e564
to
865f183
Compare
AltGr
approved these changes
Sep 2, 2021
rjbou
force-pushed
the
relax-sandbox-macos
branch
from
September 2, 2021 14:49
865f183
to
416a74e
Compare
What's up with the macOS test? |
rjbou
force-pushed
the
relax-sandbox-macos
branch
from
September 13, 2021 15:58
416a74e
to
6d4a26b
Compare
I've sent a bug report to Apple about it btw. |
Found it!
|
So sandbox check is failing, and it is removed from config file. |
rjbou
force-pushed
the
relax-sandbox-macos
branch
from
May 20, 2022 08:02
6d4a26b
to
c9bf16b
Compare
From tests, seems that this changes disable sandbox. |
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.
This is an attempt at fixing #4389
I've used
dtrace
on/usr/bin/security
but I still can't find the exact point where something is written in that directory.It looks related to something in
/private/var/db/mds
, probably a symlink to/private/var/folders
.In any case i've looked around and realized that macports had similar things so maybe it makes sense(?). They also have other things but I'm not sure we should allow even more: https://github.com/macports/macports-base/blob/2c6fc24ddd1d6961afa83c5b35be12224b6850f6/src/port1.0/portsandbox.tcl#L92
All in all I have no idea what this directory is supposed to be in the context of
/usr/bin/security
. Their commit adding it doesn't say anything either: macports/macports-base@e3eceeaSeveral blog posts in the wild are also trying to understand what's up with this directory:
hier(7)
says it's "per-user temporary files and caches", so allowing writes like macports does doesn't seem right to me.However, I found out (late into writing this PR even ^^") that if we forbid reads into that directory,
/usr/bin/security
won't try to write in it and still succeeds.This is most likely a bug in macOS itself but there we are!
cc @hannesm