-
Notifications
You must be signed in to change notification settings - Fork 19
/
preview.sb
48 lines (41 loc) · 1.03 KB
/
preview.sb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(version 1)
(debug deny)
(import "bsd.sb")
(allow signal)
(allow ipc-posix-shm)
(allow process*)
(allow mach-lookup)
;(allow mach*)
;(allow process-exec (regex #"^/Applications/Preview.app/Contents/MacOS/Preview$"))
;;(allow process-fork)
(allow file-read*
(regex
#"^/Users/[^.]+/$"
#"^/Users/[^.]+/Library"
#"^/Users/[^.]+/Public"
#"^/Applications/Preview.app"
#"^/Library/*"
#"^/System/Library/*"
#"^/usr/lib/*"
#"^/usr/share/*"
#"^/private/*"
#"^/dev/*"
)
)
;(allow file-read-metadata
; (literal "/")
; (literal "/Library/Preferences/.GlobalPreferences.plist")
; (literal "/etc")
; (literal "/private/var/root")
; (literal "/private/var/root/Library/Preferences/.GlobalPreferences.plist")
; (literal "/var")
; (literal "/usr/")
; (subpath "/System")
;)
(allow file-read-data file-write* file-read-metadata
(regex
#"^/Users/[^.]+/Library/Application Support/Preview"
)
)
(deny network*)
(deny default)