OLD | NEW |
1 ;; | 1 ;; |
2 ;; Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 ;; Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 ;; Use of this source code is governed by a BSD-style license that can be | 3 ;; Use of this source code is governed by a BSD-style license that can be |
4 ;; found in the LICENSE file. | 4 ;; found in the LICENSE file. |
5 ;; | 5 ;; |
6 ; This configuration file isn't used on it's own, but instead implicitly | 6 ; This configuration file isn't used on it's own, but instead implicitly |
7 ; included at the start of all other sandbox configuration files in Chrome. | 7 ; included at the start of all other sandbox configuration files in Chrome. |
8 (version 1) | 8 (version 1) |
9 | 9 |
10 ; Helper function to check if a param is set to true. | 10 ; Helper function to check if a param is set to true. |
11 (define (param-true? str) (string=? (param str) "TRUE")) | 11 (define (param-true? str) (string=? (param str) "TRUE")) |
12 | 12 |
13 ; Helper function to determine if a parameter is defined or not. | 13 ; Helper function to determine if a parameter is defined or not. |
14 (define (param-defined? str) (string? (param str))) | 14 (define (param-defined? str) (string? (param str))) |
15 | 15 |
16 ; Define constants for all of the parameter strings passed in. | 16 ; Define constants for all of the parameter strings passed in. |
17 (define disable-sandbox-denial-logging "DISABLE_SANDBOX_DENIAL_LOGGING") | 17 (define disable-sandbox-denial-logging "DISABLE_SANDBOX_DENIAL_LOGGING") |
18 (define enable-logging "ENABLE_LOGGING") | 18 (define enable-logging "ENABLE_LOGGING") |
19 (define permitted-dir "PERMITTED_DIR") | 19 (define permitted-dir "PERMITTED_DIR") |
20 (define homedir-as-literal "USER_HOMEDIR_AS_LITERAL") | 20 (define homedir-as-literal "USER_HOMEDIR_AS_LITERAL") |
21 (define lion-or-later "LION_OR_LATER") | |
22 (define elcap-or-later "ELCAP_OR_LATER") | 21 (define elcap-or-later "ELCAP_OR_LATER") |
23 | 22 |
24 ; Consumes a subpath and appends it to the user's homedir path. | 23 ; Consumes a subpath and appends it to the user's homedir path. |
25 (define (user-homedir-path subpath) (string-append (param homedir-as-literal) su
bpath)) | 24 (define (user-homedir-path subpath) (string-append (param homedir-as-literal) su
bpath)) |
26 | 25 |
27 ; DISABLE_SANDBOX_DENIAL_LOGGING turns off log messages in the system log. | 26 ; DISABLE_SANDBOX_DENIAL_LOGGING turns off log messages in the system log. |
28 (if (param-true? disable-sandbox-denial-logging) | 27 (if (param-true? disable-sandbox-denial-logging) |
29 (deny default (with no-log)) | 28 (deny default (with no-log)) |
30 (deny default)) | 29 (deny default)) |
31 | 30 |
(...skipping 10 matching lines...) Expand all Loading... |
42 (allow file-read* | 41 (allow file-read* |
43 (regex #"^/System/Library/Frameworks($|/)") | 42 (regex #"^/System/Library/Frameworks($|/)") |
44 (regex #"^/System/Library/PrivateFrameworks($|/)") | 43 (regex #"^/System/Library/PrivateFrameworks($|/)") |
45 (regex #"^/System/Library/CoreServices($|/)")) | 44 (regex #"^/System/Library/CoreServices($|/)")) |
46 | 45 |
47 (allow ipc-posix-shm) | 46 (allow ipc-posix-shm) |
48 | 47 |
49 ; Allow direct access to /dev/urandom, similar to Linux/POSIX, to allow | 48 ; Allow direct access to /dev/urandom, similar to Linux/POSIX, to allow |
50 ; third party code (eg: bits of Adobe Flash and NSS) to function properly. | 49 ; third party code (eg: bits of Adobe Flash and NSS) to function properly. |
51 (allow file-read-data file-read-metadata (literal "/dev/urandom")) | 50 (allow file-read-data file-read-metadata (literal "/dev/urandom")) |
OLD | NEW |