]> git.lizzy.rs Git - torbrowser-launcher.git/commitdiff
AppArmor: support sysvinit systems.
authorintrigeri <intrigeri@boum.org>
Sat, 9 Sep 2017 17:28:02 +0000 (17:28 +0000)
committerintrigeri <intrigeri@boum.org>
Sat, 9 Sep 2017 17:30:33 +0000 (17:30 +0000)
With systemd (at least on current Debian sid), /run/shm is a symlink to
/dev/shm, so "owner /dev/shm/org.chromium.* rw," is enough. With sysvinit,
apparently things are set up differently (perhaps the symlinks are in the
opposite direction?) so Firefox tries to access /run/shm/org.chromium.*,
which was rejected.

Let's support both!

Thanks to gregor herrmann <gregoa@debian.org> for the bug report:
https://bugs.debian.org/874383

Note that this problem happens with pristine 0.2.8 profiles,
without the changes brought by my apparmor-e10s branch.

apparmor/torbrowser.Browser.firefox
apparmor/torbrowser.Browser.plugin-container

index 1d6421e7c4d6b9b8a77a6ce2bca02fded444bacc..25a438ba0dbe35a745dfab49ced7078fe811cffa 100644 (file)
@@ -80,7 +80,7 @@
   owner /{dev,run}/shm/shmfd-* rw,
 
   # Required for multiprocess Firefox (aka Electrolysis, i.e. e10s)
-  owner /dev/shm/org.chromium.* rw,
+  owner /{dev,run}/shm/org.chromium.* rw,
 
   # Deny access to DRM nodes, that's granted by the X abstraction, which is
   # sourced by the gnome abstraction, that we include.
index 121404489ec0ef24134b30a18c55fcc09c2800b7..ee30fd4129fc595d78020144cadbeed11c4502d5 100644 (file)
@@ -66,7 +66,7 @@ profile torbrowser_plugin_container {
   owner /{dev,run}/shm/shmfd-* rw,
 
   # Required for multiprocess Firefox (aka Electrolysis, i.e. e10s)
-  owner /dev/shm/org.chromium.* rw,
+  owner /{dev,run}/shm/org.chromium.* rw,
 
   # Deny access to DRM nodes, that's granted by the X abstraction, which is
   # sourced by the gnome abstraction, that we include.