~ubuntu-branches/ubuntu/precise/firefox/precise-security

« back to all changes in this revision

Viewing changes to debian/usr.bin.firefox.apparmor.12.04

  • Committer: Package Import Robot
  • Author(s): Chris Coulson, Jamie Strandboge, Chris Coulson
  • Date: 2011-12-15 14:00:30 UTC
  • mfrom: (1.1.65)
  • Revision ID: package-import@ubuntu.com-20111215140030-gndwz65jg7ct95lo
Tags: 9.0~b6+build1-0ubuntu1
* New upstream release from the beta channel (FIREFOX_9_0b6_BUILD1)

[ Jamie Strandboge <jamie@ubuntu.com> ]
* add debian/usr.bin.firefox.apparmor.12.04 and adjust it to declare a
  @{MOZ_LIBDIR} which will help with overrides
* debian/rules: adjust to install the profile on 12.04
* debian/usr.bin.firefox.apparmor.12.04: don't use @{MOZ_LIBDIR} variable
  for the binary names

[ Chris Coulson <chris.coulson@canonical.com> ]
* Fix LP: #901838 - Ugly busy pointer, due to libxcursor no longer matching
  the cursor bitmap to a nice themed pointer
  - add debian/patches/fix-cursor-handling.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim:syntax=apparmor
 
2
# Author: Jamie Strandboge <jamie@canonical.com>
 
3
 
 
4
# Declare an apparmor variable to help with overrides
 
5
@{MOZ_LIBDIR}=@MOZ_LIBDIR@
 
6
 
 
7
#include <tunables/global>
 
8
 
 
9
# We want to confine the binaries that match:
 
10
#  @MOZ_LIBDIR@/@MOZ_APP_NAME@
 
11
#  @MOZ_LIBDIR@/firefox
 
12
# but not:
 
13
#  @MOZ_LIBDIR@/firefox.sh
 
14
@MOZ_LIBDIR@/firefox{,*[^s][^h]} {
 
15
  #include <abstractions/audio>
 
16
  #include <abstractions/cups-client>
 
17
  #include <abstractions/dbus-session>
 
18
  #include <abstractions/gnome>
 
19
  #include <abstractions/nameservice>
 
20
 
 
21
  # Addons
 
22
  #include <abstractions/ubuntu-browsers.d/firefox>
 
23
 
 
24
  # for networking
 
25
  network inet stream,
 
26
  network inet6 stream,
 
27
  @{PROC}/[0-9]*/net/if_inet6 r,
 
28
  @{PROC}/[0-9]*/net/ipv6_route r,
 
29
 
 
30
  # should maybe be in abstractions
 
31
  /etc/ r,
 
32
  /etc/mime.types r,
 
33
  /etc/mailcap r,
 
34
  /etc/xdg/*buntu/applications/defaults.list    r, # for all derivatives
 
35
  /usr/share/xubuntu/applications/defaults.list r,
 
36
  owner @{HOME}/.local/share/applications/defaults.list r,
 
37
  owner @{HOME}/.local/share/applications/mimeapps.list r,
 
38
  owner @{HOME}/.local/share/applications/mimeinfo.cache r,
 
39
  owner /tmp/** m,
 
40
  owner /var/tmp/** m,
 
41
  /tmp/.X[0-9]*-lock r,
 
42
 
 
43
  /etc/timezone r,
 
44
  /etc/wildmidi/wildmidi.cfg r,
 
45
 
 
46
  # firefox specific
 
47
  /etc/firefox*/ r,
 
48
  /etc/firefox*/** r,
 
49
  /etc/xul-ext/** r,
 
50
  /etc/xulrunner-2.0*/ r,
 
51
  /etc/xulrunner-2.0*/** r,
 
52
  /etc/gre.d/ r,
 
53
  /etc/gre.d/* r,
 
54
 
 
55
  # noisy
 
56
  deny @{MOZ_LIBDIR}/** w,
 
57
  deny /usr/lib/@MOZ_APP_NAME@-addons/** w,
 
58
  deny /usr/lib/xulrunner-addons/** w,
 
59
  deny /usr/lib/xulrunner-*/components/*.tmp w,
 
60
  deny /.suspended r,
 
61
  deny /boot/initrd.img* r,
 
62
  deny /boot/vmlinuz* r,
 
63
  deny /var/cache/fontconfig/ w,
 
64
  deny @{HOME}/.local/share/recently-used.xbel r,
 
65
 
 
66
  # TODO: investigate
 
67
  deny /usr/bin/gconftool-2 x,
 
68
 
 
69
  # These are needed when a new user starts firefox and firefox.sh is used
 
70
  @{MOZ_LIBDIR}/** ixr,
 
71
  /usr/bin/basename ixr,
 
72
  /usr/bin/dirname ixr,
 
73
  /usr/bin/pwd ixr,
 
74
  /sbin/killall5 ixr,
 
75
  /bin/which ixr,
 
76
  /usr/bin/tr ixr,
 
77
  @{PROC}/ r,
 
78
  @{PROC}/[0-9]*/cmdline r,
 
79
  @{PROC}/[0-9]*/mountinfo r,
 
80
  @{PROC}/[0-9]*/stat r,
 
81
  owner @{PROC}/[0-9]*/task/[0-9]*/stat r,
 
82
  @{PROC}/[0-9]*/status r,
 
83
  @{PROC}/filesystems r,
 
84
  owner @{HOME}/.thumbnails/*/*.png r,
 
85
 
 
86
  /etc/mtab r,
 
87
  /etc/fstab r,
 
88
 
 
89
  # Needed for the crash reporter
 
90
  owner @{PROC}/[0-9]*/environ r,
 
91
  owner @{PROC}/[0-9]*/auxv r,
 
92
  /etc/lsb-release r,
 
93
  /usr/bin/expr ix,
 
94
  /sys/devices/system/cpu/ r,
 
95
  /sys/devices/system/cpu/** r,
 
96
 
 
97
  # Needed for container to work in xul builds
 
98
  /usr/lib/xulrunner-*/plugin-container ixr,
 
99
 
 
100
  # allow access to documentation and other files the user may want to look
 
101
  # at in /usr
 
102
  /usr/ r,
 
103
  /usr/** r,
 
104
 
 
105
  # so browsing directories works
 
106
  / r,
 
107
  /**/ r,
 
108
 
 
109
  # Default profile allows downloads to ~/Downloads and uploads from ~/Public
 
110
  owner @{HOME}/ r,
 
111
  owner @{HOME}/Public/ r,
 
112
  owner @{HOME}/Public/* r,
 
113
  owner @{HOME}/Downloads/ r,
 
114
  owner @{HOME}/Downloads/* rw,
 
115
 
 
116
  # per-user firefox configuration
 
117
  owner @{HOME}/.{firefox,mozilla}/ rw,
 
118
  owner @{HOME}/.{firefox,mozilla}/** rw,
 
119
  owner @{HOME}/.{firefox,mozilla}/**/*.{db,parentlock,sqlite}* k,
 
120
  owner @{HOME}/.{firefox,mozilla}/plugins/** rm,
 
121
  owner @{HOME}/.{firefox,mozilla}/**/plugins/** rm,
 
122
  owner @{HOME}/.config/ibus/bus/ w,
 
123
  owner @{HOME}/.gnome2/firefox*-bin-* rw,
 
124
 
 
125
  #
 
126
  # Extensions
 
127
  # /usr/share/.../extensions/... is already covered by '/usr/** r', above.
 
128
  # Allow 'x' for downloaded extensions, but inherit policy for safety
 
129
  owner @{HOME}/.mozilla/**/extensions/** mixr,
 
130
 
 
131
  deny @{MOZ_LIBDIR}/update.test w,
 
132
  deny /usr/lib/mozilla/extensions/**/ w,
 
133
  deny /usr/lib/xulrunner-addons/extensions/**/ w,
 
134
  deny /usr/share/mozilla/extensions/**/ w,
 
135
  deny /usr/share/mozilla/ w,
 
136
 
 
137
  # Miscellaneous (to be abstracted)
 
138
  /usr/bin/mkfifo Uxr,  # TODO: investigate
 
139
  /bin/ps Uxr,          # TODO: child profile
 
140
  /bin/uname Uxr,       # TODO: child profile
 
141
 
 
142
  # Site-specific additions and overrides. See local/README for details.
 
143
  #include <local/usr.bin.firefox>
 
144
}