Created
August 29, 2016 09:56
-
-
Save eruffaldi/39092b583dd4b3280e60c5f4db48c5c5 to your computer and use it in GitHub Desktop.
OSX Sandboxing Writing
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
(version 1) | |
(deny default) | |
(allow file-read*) | |
(allow process-exec) | |
(allow sysctl-read) | |
(allow signal) | |
(allow file-write* (regex (string-append "^" (regex-quote (param "target")) ".*"))) |
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
#/bin/bash | |
target=$1 | |
shift 1 | |
P=$(dirname $(realpath -s ${BASH_SOURCE[0]})) | |
sandbox-exec -f $P/writethere.sb -Dtarget=$target $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment