Created
June 21, 2017 12:50
-
-
Save eruffaldi/649d2ea0aa6d67b3c405635a731dac20 to your computer and use it in GitHub Desktop.
Sandboxed Build for Cross-compilation
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 sysctl-read) | |
(allow signal) | |
(allow process-exec) | |
(allow process-fork) | |
(allow mach* sysctl-read) | |
(allow file-read* (regex "^.*")) | |
(deny file-read* (regex "^/usr/local/include.*") (regex "^/usr/include.*")) | |
(allow file-write* (regex (string-append "^/tmp/.*")) (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 | |
# allowedpath command [args...] | |
target=$1 | |
shift 1 | |
P=$(dirname $(realpath -s ${BASH_SOURCE[0]})) | |
sandbox-exec -f $P/hideincludes.sb -Dtarget=$target $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment