-
Notifications
You must be signed in to change notification settings - Fork 227
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
Enable sandboxing #1692
Closed
Closed
Enable sandboxing #1692
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
2 tasks
Eitot
force-pushed
the
feature/sandbox
branch
3 times, most recently
from
July 2, 2023 18:55
61806e8
to
49cb216
Compare
Eitot
force-pushed
the
feature/sandbox
branch
from
December 24, 2023 15:11
9b18b87
to
f4c3233
Compare
Eitot
force-pushed
the
feature/sandbox
branch
from
January 21, 2024 17:42
f4c3233
to
1c164f6
Compare
Note: The system automatically migrates Vienna's library files to a sandbox container on launching Vienna with sandboxing enabled. This can be reversed by using the provided shell script, e.g. for development purposes or for downgrading to an earlier version of Vienna. The container-migration.plist file specifies the old and new locations for the migration. It should cover all of Vienna's directories and files, so that the user ideally ends up with a complete sandbox container. Some system-defined locations have to be changed to avoid duplication. For example, Apple moved the cookies storage from ~/Library/Cookies to ~/Library/HTTPStorages starting with macOS 11/Safari 14. Within sandbox containers however, ~/Library/Cookies is used. The automatic migration does not overwrite files. Therefore, a migration of ~/Library/HTTPStorages is attempted first. If that attempt is successful then the migration of ~/Library/Cookies should (silently) fail; otherwise ~/Library/Cookies is migrated instead. User preferences in ~/Library/Preferences are migrated automatically. User scripts are migrated from ~/Library/Scripts/Applications/Vienna to ~/Library/Application Scripts/<bundle ID> and a symlink is left at the former location; this also happens automatically. The shell script uses ditto to copy the directories. Ditto will merge directories rather than overwrite them, if the destination directory exists. It will, however, overwrite individual files.
NSOpenSavePanelDelegate methods do not work with sandboxing. The URLs returned by the delegate callbacks are inaccessible until NSOpenPanel calls the completion handler. A workaround is to validate the URL after it was selected. When the URL is inaccessible (i.e. not writable) then an error is shown and the open panel reopens, giving the user the opportunity to choose a different directory or cancel.
Eitot
added
the
changes localisations 💬
This pull request adds, changes or removes localisation keys.
label
Jul 26, 2024
Eitot
removed
the
changes localisations 💬
This pull request adds, changes or removes localisation keys.
label
Jul 26, 2024
@Eitot: can you indicate a specific reason which led you to close this work in progress ? |
I didn't feel confident enough to submit this. Enabling sandboxing will make it cumbersome to downgrade to previous versions. There have been some significant issues in the releases lately that have given me pause. I intend to keep the branch up to date though and revisit this in the future. |
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.
Important
The system automatically migrates Vienna's library files to a sandbox container on launching Vienna with sandboxing enabled. This can be reversed by using the provided shell script (
Vienna.app/Contents/SharedSupport/undo-container-migration.sh
), e.g. for development purposes or for downgrading to an earlier version of Vienna.The container-migration.plist file specifies the old and new locations for the migration. It should cover all of Vienna's directories and files, so that the user ideally ends up with a complete sandbox container.
Some system-defined locations have to be changed to avoid duplication. For example, Apple moved the cookies storage from
~/Library/Cookies
to~/Library/HTTPStorages
starting with macOS 11/Safari 14. Within sandbox containers however,~/Library/Cookies
is used. The automatic migration does not overwrite files. Therefore, a migration of~/Library/HTTPStorages
is attempted first. If that attempt is successful then the migration of~/Library/Cookies
should (silently) fail; otherwise~/Library/Cookies
is migrated instead.User preferences in
~/Library/Preferences
are migrated automatically. User scripts are migrated from~/Library/Scripts/Applications/Vienna
to~/Library/Application Scripts/<bundle ID>
and a symlink is left at the former location; this also happens automatically.The shell script uses ditto to copy the directories. Ditto will merge directories rather than overwrite them, if the destination directory exists. It will, however, overwrite individual files.