Sandbox/OS X Rule Set: Difference between revisions

Jump to navigation Jump to search
Update level1 and level2 specific rules to match recent code changes.
(Tweaks)
(Update level1 and level2 specific rules to match recent code changes.)
Line 510: Line 510:
/private/var/folders/[^/][^/][^/]+/[^/]org.chromium.[a-Z0-9]*<br>
/private/var/folders/[^/][^/][^/]+/[^/]org.chromium.[a-Z0-9]*<br>
Not found on my 10.11 system.
Not found on my 10.11 system.
|- id=aar_lib_ext
|- id=aar_lib_ext
|
|
Line 521: Line 523:
||
||
See the docs on extensions.autoDisableScopes for more information on these paths. The first path allow access to an Extensions directory that applies to all of a user's profiles. The second is for a system-wide Extensions directory that applies to all users. The setting of extensions.autoDisableScopes controls whether or not these locations are used.
See the docs on extensions.autoDisableScopes for more information on these paths. The first path allow access to an Extensions directory that applies to all of a user's profiles. The second is for a system-wide Extensions directory that applies to all users. The setting of extensions.autoDisableScopes controls whether or not these locations are used.
|- id=aar_lib_profile
 
 
|- id=level1_fs_rules
|
|
[[#aar_lib_profile|link]]
[[#level1_fs_rules|link]]
<pre style="border:none;">
<pre style="border:none;">
   "; Profile subdirectories\n"
   "; The following rules impose file access restrictions which get\n"
   " (if (not (zero? hasProfileDir)) (allow file-read*\n"
  "; more restrictive in higher levels. When file-origin-specific\n"
   "     (profile-subpath \"/extensions\")\n"
  "; content processes are used for file:// origin browsing, the\n"
   "      (profile-subpath \"/weave\")))\n"
   "; global file-read* permission should be removed from each level.\n"
  "\n"
  "; level 1: global read access permitted, no home write access\n"
   " (if (= sandbox-level 1)\n"
  "   (begin\n"
  "      (allow file-read*)\n"
   "      (allow file-write* (require-not (subpath home-path)))))\n"
</pre>
</pre>
||
|| Level 1-specifc filesystem rules: allow reading to anywhere the OS permits. Do not allow writing anywhere in the home directory.
These allow access to the extensions and weave subdirectories within the current profile. Read and write access to the profile director is blocked (in other rules). Bug 1295700 was filed to address removing access to sensitive weave sync data.
|- id=level2_fs_rules
|- id=aar_home_lib
|
|
[[#aar_home_lib|link]]
[[#level2_fs_rules|link]]
<pre style="border:none;">
<pre style="border:none;">
   "; the following rules should be removed when printing and\n"
   "; level 2: global read access permitted, no home write access,\n"
   "; opening a file from disk are brokered through the main process\n"
   ";         no read/write access to ~/Library,\n"
   "  (if (< sandbox-level 2)\n"
  ";          no read/write access to $PROFILE,\n"
  ";          read access permitted to $PROFILE/{extensions,weave}\n"
   "  (if (= sandbox-level 2)\n"
   "    (if (not (zero? hasProfileDir))\n"
   "    (if (not (zero? hasProfileDir))\n"
   "      (allow file*\n"
  "      ; we have a profile dir\n"
   "         (require-all\n"
   "      (begin\n"
   "       (allow file-read* (require-all\n"
   "              (require-not (home-subpath \"/Library\"))\n"
   "              (require-not (home-subpath \"/Library\"))\n"
   "              (require-not (subpath profileDir))))\n"
   "              (require-not (subpath profileDir))))\n"
   "     (allow file*\n"
   "       (allow file-write* (require-all\n"
   "         (require-not (home-subpath \"/Library\"))))\n"
   "             (require-not (subpath home-path))\n"
   "   (allow file*\n"
  "             (require-not (subpath profileDir))))\n"
   "       (require-all\n"
   "       (allow file-read*\n"
   "           (subpath home-path)\n"
   "             (profile-subpath \"/extensions\")\n"
   "           (require-not\n"
   "             (profile-subpath \"/weave\")))\n"
   "               (home-subpath \"/Library\")))))\n"
   "     ; we don't have a profile dir\n"
  "      (begin\n"
  "        (allow file-read*\n"
   "             (require-not (home-subpath \"/Library\")))\n"
  "        (allow file-write* (require-all\n"
  "              (require-not (subpath home-path)))))))\n"
</pre>
</pre>
|| File read and write access for $HOME excluding ~/Library and the current profile directory. We need write access for printing. We need read access to allow user to read files from $HOME. i.e., file:// resources.
|| Level 2-specifc filesystem rules: do not allow writing anywhere in the home directory. Allow reading to anywhere the OS permits except ~/Library or the PROFILE dir. Allow reading from PROFILE/extensions and PROFILE/weave.
|- id=aar_printpreview
|- id=aar_printpreview
|
|
202

edits

Navigation menu