1 ; Copyright (C) 2010, 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
3 ; Redistribution and use in source and binary forms, with or without
4 ; modification, are permitted provided that the following conditions
6 ; 1. Redistributions of source code must retain the above copyright
7 ; notice, this list of conditions and the following disclaimer.
8 ; 2. Redistributions in binary form must reproduce the above copyright
9 ; notice, this list of conditions and the following disclaimer in the
10 ; documentation and/or other materials provided with the distribution.
12 ; THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
13 ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
14 ; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 ; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
16 ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17 ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
18 ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
19 ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20 ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21 ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
22 ; THE POSSIBILITY OF SUCH DAMAGE.
25 (deny default (with partial-symbolication))
26 (allow system-audit file-read-metadata)
28 (import "UIKit-apps.sb")
29 (import "removed-dev-nodes.sb")
31 (uikit-app 'with-opengl 'with-location-services)
33 ;; Access to media controls
37 ;; Read-only preferences and data
38 (mobile-preferences-read
39 "com.apple.LaunchServices"
40 "com.apple.WebFoundation"
41 "com.apple.mobileipod")
44 (define (apply-read-and-issue-extension op path-filter)
45 (op file-read* path-filter)
46 (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") path-filter)))
47 (define (apply-write-and-issue-extension op path-filter)
48 (op file-write* path-filter)
49 (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") path-filter)))
50 (define (read-only-and-issue-extensions path-filter)
51 (apply-read-and-issue-extension allow path-filter))
52 (define (read-write-and-issue-extensions path-filter)
53 (apply-read-and-issue-extension allow path-filter)
54 (apply-write-and-issue-extension allow path-filter))
55 (read-only-and-issue-extensions (extension "com.apple.app-sandbox.read"))
56 (read-write-and-issue-extensions (extension "com.apple.app-sandbox.read-write"))
58 ;; Access to client's cache folder & re-vending to CFNetwork.
59 ;; FIXME: Remove the webkti specific extension classes <rdar://problem/17755931>
60 (allow file-issue-extension (require-all
61 (extension "com.apple.app-sandbox.read-write")
62 (extension-class "com.apple.nsurlstorage.extension-cache")))
64 ;; Allow the OpenGL Profiler to attach.
65 (instruments-support) ; For <rdar://problem/7931952>
68 (mobile-preferences-read "com.apple.mediaaccessibility")
69 (mobile-preferences-read-write "com.apple.mediaaccessibility.public")
71 ;; Remote Web Inspector
73 (global-name "com.apple.webinspector"))
75 ;; Various services required by CFNetwork and other frameworks
77 (global-name "com.apple.PowerManagement.control")
78 (global-name "com.apple.accountsd.accountmanager")
79 (global-name "com.apple.awdd"))
81 (deny file-write-create (vnode-type SYMLINK))
82 (deny file-read-xattr file-write-xattr (xattr-regex #"^com\.apple\.security\.private\."))
84 (network-client (remote tcp))