logo

apparmor.d

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/apparmor.d.git

snap_browsers (1613B)


  1. profile snap_browsers {
  2. include if exists <abstractions/snap_browsers.d>
  3. include <abstractions/base>
  4. include <abstractions/dbus-session-strict>
  5. /etc/passwd r,
  6. /etc/nsswitch.conf r,
  7. /etc/fstab r,
  8. # noisy
  9. deny owner /run/user/[0-9]*/gdm/Xauthority r, # not needed on Ubuntu
  10. /{,snap/core/[0-9]*/,snap/snapd/[0-9]*/}usr/bin/snap mrix, # re-exec
  11. /{,snap/core/[0-9]*/,snap/snapd/[0-9]*/}usr/lib/snapd/info r,
  12. /{,snap/core/[0-9]*/,snap/snapd/[0-9]*/}usr/lib/snapd/snapd r,
  13. /{,snap/core/[0-9]*/,snap/snapd/[0-9]*/}usr/lib/snapd/snap-seccomp rPix,
  14. /{,snap/core/[0-9]*/,snap/snapd/[0-9]*/}usr/lib/snapd/snap-confine Pix,
  15. /var/lib/snapd/system-key r,
  16. /run/snapd.socket rw,
  17. @{PROC}/version r,
  18. @{PROC}/cmdline r,
  19. @{PROC}/sys/net/core/somaxconn r,
  20. @{PROC}/sys/kernel/seccomp/actions_avail r,
  21. @{PROC}/sys/kernel/random/uuid r,
  22. owner @{PROC}/@{pid}/cgroup r,
  23. owner @{PROC}/@{pid}/mountinfo r,
  24. owner @{HOME}/.snap/auth.json r, # if exists, required
  25. dbus send bus="session" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="StartTransientUnit" peer=(name="org.freedesktop.systemd1"),
  26. dbus receive bus="session" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="JobRemoved",
  27. /sys/kernel/security/apparmor/features/ r,
  28. # allow launching official browser snaps.
  29. /snap/chromium/[0-9]*/meta/{snap.yaml,hooks/} r,
  30. /snap/firefox/[0-9]*/meta/{snap.yaml,hooks/} r,
  31. /snap/opera/[0-9]*/meta/{snap.yaml,hooks/} r,
  32. /var/lib/snapd/sequence/{chromium,firefox,opera}.json r,
  33. # add other browsers here
  34. }