~ubuntu-branches/ubuntu/wily/apparmor-easyprof-ubuntu/wily

« back to all changes in this revision

Viewing changes to data/templates/ubuntu/1.1/ubuntu-webapp

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge
  • Date: 2014-09-05 15:17:07 UTC
  • Revision ID: package-import@ubuntu.com-20140905151707-6f13l1kr9xm3ri7d
* Updates for abstract and anonymous socket mediation (LP: #1362199):
  - ubuntu/*/ubuntu-*:
    + use dbus-strict and dbus-session-strict abstractions and remove
      duplicated policy
    + allow ubuntu-sdk and ubuntu-webapp connect, receive and send on the
      maliit abstract socket
    + allow write access to owner /{,var/}run/user/*/@{APP_PKGNAME}/{,**}
  - ubuntu/*/unconfined: allow unix
  - ubuntu/webview:
    + allow oxide to talk to sandbox via unix sockets
    + allow sandbox to talk to @{APP_PKGNAME}_@{APP_APPNAME}_@{APP_VERSION}
      peer
    + allow various unix perms from base abstract for the sandbox to use
      unix sockets
  - debian/control: Depends on apparmor >= 2.8.96~2541-0ubuntu4
* ubuntu/webview: use @{APP_PKGNAME}_@{APP_APPNAME}_@{APP_VERSION} for
  signal now that we have @{APP_APPNAME} available (LP: #1363112)
* ubuntu/debug: 'audit deny @{HOME}/.local/share/ r' which is used by the
  SDK to see if confined
* debian/control: Depends on apparmor >= 2.8.96~2541-0ubuntu4~

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  #include "/usr/share/apparmor/hardware/graphics.d"
34
34
 
35
35
  #
36
 
  # DBus rules common for all webapps
 
36
  # IPC rules common for all webapps
37
37
  #
38
38
  # Allow connecting to session bus and where to connect to services
39
 
  dbus (send)
40
 
       bus=session
41
 
       path=/org/freedesktop/DBus
42
 
       interface=org.freedesktop.DBus
43
 
       member=Hello
44
 
       peer=(name=org.freedesktop.DBus),
45
 
  dbus (send)
46
 
       bus=session
47
 
       path=/org/freedesktop/{db,DB}us
48
 
       interface=org.freedesktop.DBus
49
 
       member={Add,Remove}Match
50
 
       peer=(name=org.freedesktop.DBus),
51
 
  # NameHasOwner and GetNameOwner could leak running processes and apps
52
 
  # depending on how services are implemented
53
 
  dbus (send)
54
 
       bus=session
55
 
       path=/org/freedesktop/DBus
56
 
       interface=org.freedesktop.DBus
57
 
       member=GetNameOwner
58
 
       peer=(name=org.freedesktop.DBus),
59
 
  dbus (send)
60
 
       bus=session
61
 
       path=/org/freedesktop/DBus
62
 
       interface=org.freedesktop.DBus
63
 
       member=NameHasOwner
64
 
       peer=(name=org.freedesktop.DBus),
65
 
 
66
 
  # Allow starting services on the session bus (actual communications with
67
 
  # the service are mediated elsewhere)
68
 
  dbus (send)
69
 
       bus=session
70
 
       path=/org/freedesktop/DBus
71
 
       interface=org.freedesktop.DBus
72
 
       member=StartServiceByName
73
 
       peer=(name=org.freedesktop.DBus),
 
39
  #include <abstractions/dbus-session-strict>
74
40
 
75
41
  # Allow connecting to system bus and where to connect to services. Put these
76
42
  # here so we don't need to repeat these rules in multiple places (actual
77
43
  # communications with any system services is mediated elsewhere). This does
78
44
  # allow apps to brute-force enumerate system services, but our system
79
45
  # services aren't a secret.
80
 
  /{,var/}run/dbus/system_bus_socket rw,
81
 
  dbus (send)
82
 
       bus=system
83
 
       path=/org/freedesktop/DBus
84
 
       interface=org.freedesktop.DBus
85
 
       member=Hello
86
 
       peer=(name=org.freedesktop.DBus),
87
 
  dbus (send)
88
 
       bus=system
89
 
       path=/org/freedesktop/{db,DB}us
90
 
       interface=org.freedesktop.DBus
91
 
       member={Add,Remove}Match
92
 
       peer=(name=org.freedesktop.DBus),
93
 
  # NameHasOwner and GetNameOwner could leak running processes and apps
94
 
  # depending on how services are implemented
95
 
  dbus (send)
96
 
       bus=system
97
 
       path=/org/freedesktop/DBus
98
 
       interface=org.freedesktop.DBus
99
 
       member=GetNameOwner
100
 
       peer=(name=org.freedesktop.DBus),
101
 
  dbus (send)
102
 
       bus=system
103
 
       path=/org/freedesktop/DBus
104
 
       interface=org.freedesktop.DBus
105
 
       member=NameHasOwner
106
 
       peer=(name=org.freedesktop.DBus),
107
 
 
108
 
  # Allow starting services on the system bus (actual communications with
109
 
  # the service are mediated elsewhere)
110
 
  dbus (send)
111
 
       bus=system
112
 
       path=/org/freedesktop/DBus
113
 
       interface=org.freedesktop.DBus
114
 
       member=StartServiceByName
115
 
       peer=(name=org.freedesktop.DBus),
 
46
  #include <abstractions/dbus-strict>
116
47
 
117
48
  # Unity shell
118
49
  dbus (send)
189
120
       interface="org.freedesktop.DBus.Properties"
190
121
       member=Get
191
122
       peer=(name=org.maliit.server),
 
123
  unix (connect, receive, send)
 
124
       type=stream
 
125
       peer=(addr="@/tmp/maliit-server/dbus-*"),
192
126
 
193
127
  # usensors
194
128
  dbus (send)
254
188
  audit deny /dev/input/** rw,
255
189
  deny /dev/fb0 rw, # don't use 'audit' since it is too noisy with the camera
256
190
 
257
 
  # FIXME: ought to go in a dbus abstraction, but dbus-session is too loose
258
 
  /etc/machine-id r,
259
 
  /var/lib/dbus/machine-id r,
260
 
 
261
191
  # subset of GNOME stuff
262
192
  /{,custom/}usr/share/icons/**              r,
263
193
  /{,custom/}usr/share/themes/**             r,
455
385
  owner @{HOME}/.config/@{APP_PKGNAME}/**               mrwkl,
456
386
  owner @{HOME}/.local/share/@{APP_PKGNAME}/            rw,      # subdir of XDG_DATA_HOME
457
387
  owner @{HOME}/.local/share/@{APP_PKGNAME}/**          mrwklix,
458
 
  owner /{,var/}run/user/*/confined/@{APP_PKGNAME}/     rw,      # subdir of XDG_RUNTIME_DIR
 
388
  owner /{,var/}run/user/*/@{APP_PKGNAME}/              rw,      # subdir of XDG_RUNTIME_DIR
 
389
  owner /{,var/}run/user/*/@{APP_PKGNAME}/**            mrwkl,
 
390
  owner /{,var/}run/user/*/confined/@{APP_PKGNAME}/     rw,      # subdir of XDG_RUNTIME_DIR (for TMPDIR)
459
391
  owner /{,var/}run/user/*/confined/@{APP_PKGNAME}/**   mrwkl,
460
392
 
461
393
  ###ABSTRACTIONS###