# vim:syntax=apparmor # Author: Jamie Strandboge #include /usr/lib/firefox-3.6.13/firefox-*bin { #include #include #include #include #include #include #include #include #include # Addons #include # for networking network inet stream, network inet6 stream, @{PROC}/[0-9]*/net/if_inet6 r, @{PROC}/[0-9]*/net/ipv6_route r, # should maybe be in abstractions /etc/ r, /etc/mime.types r, /etc/mailcap r, /etc/xdg/{,xdg-}xubuntu/applications/defaults.list r, owner @{HOME}/.local/share/applications/defaults.list r, owner @{HOME}/.local/share/applications/mimeinfo.cache r, owner /tmp/** m, owner /var/tmp/** m, /etc/timezone r, /etc/wildmidi/wildmidi.cfg r, # firefox specific /etc/firefox*/ r, /etc/firefox*/** r, /etc/xul-ext/** r, /etc/xulrunner-1.9*/ r, /etc/xulrunner-1.9*/** r, /etc/gre.d/ r, /etc/gre.d/* r, # noisy deny /usr/lib/firefox-3.6.13/** w, deny /usr/lib/firefox-addons/** w, deny /usr/lib/xulrunner-addons/** w, deny /usr/lib/xulrunner-*/components/*.tmp w, deny /.suspended r, deny /boot/initrd.img* r, deny /boot/vmlinuz* r, deny /var/cache/fontconfig/ w, # These are needed when a new user starts firefox and firefox.sh is used /usr/lib/firefox-3.6.13/** ixr, /usr/bin/basename ixr, /usr/bin/dirname ixr, /usr/bin/pwd ixr, /sbin/killall5 ixr, /bin/which ixr, /usr/bin/tr ixr, @{PROC}/ r, @{PROC}/[0-9]*/cmdline r, @{PROC}/[0-9]*/stat r, @{PROC}/[0-9]*/status r, @{PROC}/filesystems r, /etc/mtab r, /etc/fstab r, # Needed for the crash reporter owner @{PROC}/[0-9]*/environ r, owner @{PROC}/[0-9]*/auxv r, /etc/lsb-release r, /usr/bin/expr ix, # Needed for container to work in xul builds /usr/lib/xulrunner-*/plugin-container ixr, # allow access to documentation and other files the user may want to look # at in /usr /usr/ r, /usr/** r, # so browsing directories works / r, /**/ r, # Default profile allows downloads to ~/Downloads and uploads from ~/Public owner @{HOME}/ r, owner @{HOME}/Public/ r, owner @{HOME}/Public/* r, owner @{HOME}/Downloads/ r, owner @{HOME}/Downloads/* rw, # per-user firefox configuration owner @{HOME}/.mozilla/ rw, owner @{HOME}/.mozilla/** rw, owner @{HOME}/.mozilla/**/*.{db,parentlock,sqlite}* k, owner @{HOME}/.mozilla/plugins/** rm, owner @{HOME}/.mozilla/**/plugins/** rm, # # Extensions # /usr/share/.../extensions/... is already covered by '/usr/** r', above. # Allow 'x' for downloaded extensions, but inherit policy for safety owner @{HOME}/.mozilla/**/extensions/** mixr, deny /usr/lib/firefox-3.6.13/update.test w, deny /usr/lib/mozilla/extensions/**/ w, deny /usr/lib/xulrunner-addons/extensions/**/ w, deny /usr/share/mozilla/extensions/**/ w, deny /usr/share/mozilla/ w, # Miscellaneous (to be abstracted) /usr/bin/mkfifo Uxr, # TODO: investigate /bin/ps Uxr, # TODO: child profile /bin/uname Uxr, # TODO: child profile # Site-specific additions and overrides. See local/README for details. #include }