Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: content/common/common.sb

Issue 2919963003: Update sandbox profiles and remove regular expressions. (Closed)
Patch Set: Remove string quoting Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/gpu.sb ('k') | content/common/sandbox_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 elcap-or-later "ELCAP_OR_LATER") 21 (define elcap-or-later "ELCAP_OR_LATER")
22 22
23 ; 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.
24 (define (user-homedir-path subpath) (string-append (param homedir-as-literal) su bpath)) 24 (define (user-homedir-path subpath)
25 (string-append (param homedir-as-literal) subpath))
26
27 ; (path) is not supported until 10.10.
28 ; TODO(kerrnel): remove this when 10.9 is no longer supported.
29 (define (path x) (literal x))
25 30
26 ; DISABLE_SANDBOX_DENIAL_LOGGING turns off log messages in the system log. 31 ; DISABLE_SANDBOX_DENIAL_LOGGING turns off log messages in the system log.
27 (if (param-true? disable-sandbox-denial-logging) 32 (if (param-true? disable-sandbox-denial-logging)
28 (deny default (with no-log)) 33 (deny default (with no-log))
29 (deny default)) 34 (deny default))
30 35
31 ; Support for programmatically enabling verbose debugging. 36 ; Support for programmatically enabling verbose debugging.
32 (if (param-true? enable-logging) (debug deny)) 37 (if (param-true? enable-logging) (debug deny))
33 38
34 ; Allow sending signals to self - https://crbug.com/20370 39 ; Allow sending signals to self - https://crbug.com/20370
35 (allow signal (target self)) 40 (allow signal (target self))
36 41
37 ; Needed for full-page-zoomed controls - https://crbug.com/11325 42 ; Needed for full-page-zoomed controls - https://crbug.com/11325
38 (allow sysctl-read) 43 (allow sysctl-read)
39 44
40 ; Loading System Libraries. 45 ; Loading System Libraries.
41 (allow file-read* 46 (allow file-read*
42 (regex #"^/System/Library/Frameworks($|/)") 47 (subpath "/System/Library/Frameworks")
43 (regex #"^/System/Library/PrivateFrameworks($|/)") 48 (subpath "/System/Library/PrivateFrameworks")
44 (regex #"^/System/Library/CoreServices($|/)")) 49 (subpath "/System/Library/CoreServices"))
45 50
46 (allow ipc-posix-shm) 51 (allow ipc-posix-shm)
47 52
48 ; Allow direct access to /dev/urandom, similar to Linux/POSIX, to allow 53 ; Allow direct access to /dev/urandom, similar to Linux/POSIX, to allow
49 ; third party code (eg: bits of Adobe Flash and NSS) to function properly. 54 ; third party code (eg: bits of Adobe Flash and NSS) to function properly.
50 (allow file-read-data file-read-metadata (literal "/dev/urandom")) 55 (allow file-read-data file-read-metadata (literal "/dev/urandom"))
OLDNEW
« no previous file with comments | « content/browser/gpu.sb ('k') | content/common/sandbox_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698