]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - debian/patches/06_apparmor-unix.patch
Apply debian/patches/07_apparmor-chrome.patch debian/patches/08_apparmor-updates...
[sojka/lightdm.git] / debian / patches / 06_apparmor-unix.patch
1 Author: Jamie Strandboge <jamie@canonical.com>
2 Description: updates for unix socket mediation
3 Forwarded: no
4
5 Index: lightdm-1.11.9/data/apparmor/abstractions/lightdm
6 ===================================================================
7 --- lightdm-1.11.9.orig/data/apparmor/abstractions/lightdm
8 +++ lightdm-1.11.9/data/apparmor/abstractions/lightdm
9 @@ -79,6 +79,20 @@
10    # needed when logging out of the guest session
11    signal (receive) peer=unconfined,
12  
13 +  unix peer=(label=@{profile_name}),
14 +  unix (receive) peer=(label=unconfined),
15 +  unix (create),
16 +  unix (getattr, getopt, setopt, shutdown),
17 +  unix (bind, listen) type=stream addr="@/com/ubuntu/upstart-session/**",
18 +  unix (bind, listen) type=stream addr="@/tmp/dbus-*",
19 +  unix (bind, listen) type=stream addr="@/tmp/.ICE-unix/[0-9]*",
20 +  unix (bind, listen) type=stream addr="@/dbus-vfs-daemon/*",
21 +  unix (bind, listen) type=stream addr="@guest*",
22 +  unix (connect, receive, send) type=stream peer=(addr="@/tmp/dbus-*"),
23 +  unix (connect, receive, send) type=stream peer=(addr="@/tmp/.X11-unix/X[0-9]*"),
24 +  unix (connect, receive, send) type=stream peer=(addr="@/dbus-vfs-daemon/*"),
25 +  unix (connect, receive, send) type=stream peer=(addr="@guest*"),
26 +
27    # silence warnings for stuff that we really don't want to grant
28    deny capability dac_override,
29    deny capability dac_read_search,
30 Index: lightdm-1.11.9/data/apparmor/abstractions/lightdm_chromium-browser
31 ===================================================================
32 --- lightdm-1.11.9.orig/data/apparmor/abstractions/lightdm_chromium-browser
33 +++ lightdm-1.11.9/data/apparmor/abstractions/lightdm_chromium-browser
34 @@ -22,6 +22,9 @@
35    # Allow receiving and sending signals to processes in the chromium child profile
36    signal (receive, send) peer=/usr/lib/lightdm/lightdm-guest-session//chromium,
37  
38 +  # Allow communications with chromium child profile via unix sockets
39 +  unix peer=(label=/usr/lib/lightdm/lightdm-guest-session//chromium),
40 +
41    profile chromium {
42      # Allow all the same accesses as other applications in the guest session
43      #include <abstractions/lightdm>
44 @@ -47,6 +50,10 @@
45      # lightdm-guest-session
46      signal (receive, send) set=("exists") peer=/usr/lib/lightdm/lightdm-guest-session,
47  
48 +    # Allow us to receive and send on unix sockets from processes in the
49 +    # lightdm-guest-session
50 +    unix (receive, send) peer=(label=/usr/lib/lightdm/lightdm-guest-session),
51 +
52      @{PROC}/[0-9]*/ r,                 # sandbox wants these
53      @{PROC}/[0-9]*/fd/ r,              # sandbox wants these
54      @{PROC}/[0-9]*/task/[0-9]*/stat r, # sandbox wants these