Merge lp:~raof/lightdm/run-is-the-new-tmp into lp:lightdm

Proposed by Chris Halse Rogers
Status: Merged
Merged at revision: 1994
Proposed branch: lp:~raof/lightdm/run-is-the-new-tmp
Merge into: lp:lightdm
Diff against target: 329 lines (+26/-26)
25 files modified
src/seat-xlocal.c (+1/-1)
src/unity-system-compositor.c (+1/-1)
tests/scripts/mir-autologin.conf (+1/-1)
tests/scripts/mir-greeter.conf (+1/-1)
tests/scripts/mir-session-compositor-crash.conf (+1/-1)
tests/scripts/mir-session-crash.conf (+1/-1)
tests/scripts/mir-session.conf (+1/-1)
tests/scripts/unity-autologin.conf (+1/-1)
tests/scripts/unity-compositor-command.conf (+1/-1)
tests/scripts/unity-compositor-crash.conf (+1/-1)
tests/scripts/unity-compositor-fail-ready.conf (+1/-1)
tests/scripts/unity-compositor-fail-start.conf (+1/-1)
tests/scripts/unity-compositor-fallback.conf (+2/-2)
tests/scripts/unity-compositor-mir-next-session.conf (+1/-1)
tests/scripts/unity-compositor-next-session.conf (+1/-1)
tests/scripts/unity-login.conf (+1/-1)
tests/scripts/unity-mir-autologin.conf (+1/-1)
tests/scripts/unity-mir-greeter-mir-session.conf (+1/-1)
tests/scripts/unity-mir-greeter-x-session.conf (+1/-1)
tests/scripts/unity-mir-lock-seat.conf (+1/-1)
tests/scripts/unity-mir-session-x-greeter.conf (+1/-1)
tests/scripts/unity-mir-switch-to-user-resettable.conf (+1/-1)
tests/scripts/unity-plymouth.conf (+1/-1)
tests/scripts/unity-switch.conf (+1/-1)
tests/scripts/unity-xdg-seat.conf (+1/-1)
To merge this branch: bzr merge lp:~raof/lightdm/run-is-the-new-tmp
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+221262@code.launchpad.net

Description of the change

Put unity-system-compositor's mir_socket under /run rather than /tmp.

/run is root-owned, so prevents non-admin users from performing a trivial DoS attack.

Longer term we should move to not having a socket file at all, and doing plain FD passing,
but that requires quite a lot of extra infrastructure.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

You should also update src/seat-xlocal.c which also creates Mir sockets in /tmp for Unity 8 sessions on desktop.

A bunch of tests now fail (make check) - you need some sed magic in tests/scripts/.

Otherwise looks great!

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1994
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~raof/lightdm/run-is-the-new-tmp/+merge/221262/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/lightdm-ci/297/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/lightdm-utopic-amd64-ci/11
    SUCCESS: http://jenkins.qa.ubuntu.com/job/lightdm-utopic-armhf-ci/10

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/lightdm-ci/297/rebuild

review: Needs Fixing (continuous-integration)
lp:~raof/lightdm/run-is-the-new-tmp updated
1995. By Chris Halse Rogers

Also lightdm-mir-%d sockets under /run

1996. By Chris Halse Rogers

Fix up the paths in the tests

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:1996
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~raof/lightdm/run-is-the-new-tmp/+merge/221262/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/lightdm-ci/298/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/lightdm-utopic-amd64-ci/12
    SUCCESS: http://jenkins.qa.ubuntu.com/job/lightdm-utopic-armhf-ci/11

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/lightdm-ci/298/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/seat-xlocal.c'
2--- src/seat-xlocal.c 2014-03-19 21:29:07 +0000
3+++ src/seat-xlocal.c 2014-05-28 16:18:36 +0000
4@@ -199,7 +199,7 @@
5
6 for (i = 0; ; i++)
7 {
8- socket_name = g_strdup_printf ("/tmp/lightdm-mir-%d", i);
9+ socket_name = g_strdup_printf ("/run/lightdm-mir-%d", i);
10 if (!g_file_test (socket_name, G_FILE_TEST_EXISTS))
11 break;
12 }
13
14=== modified file 'src/unity-system-compositor.c'
15--- src/unity-system-compositor.c 2014-05-01 14:42:19 +0000
16+++ src/unity-system-compositor.c 2014-05-28 16:18:36 +0000
17@@ -470,7 +470,7 @@
18 compositor->priv = G_TYPE_INSTANCE_GET_PRIVATE (compositor, UNITY_SYSTEM_COMPOSITOR_TYPE, UnitySystemCompositorPrivate);
19 compositor->priv->vt = -1;
20 compositor->priv->command = g_strdup ("unity-system-compositor");
21- compositor->priv->socket = g_strdup ("/tmp/mir_socket");
22+ compositor->priv->socket = g_strdup ("/run/mir_socket");
23 compositor->priv->timeout = -1;
24 }
25
26
27=== modified file 'tests/scripts/mir-autologin.conf'
28--- tests/scripts/mir-autologin.conf 2014-04-03 19:52:38 +0000
29+++ tests/scripts/mir-autologin.conf 2014-05-28 16:18:36 +0000
30@@ -10,7 +10,7 @@
31 #?RUNNER DAEMON-START
32
33 # System compositor starts
34-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
35+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
36 #?*UNITY-SYSTEM-COMPOSITOR READY
37
38 # Session starts
39
40=== modified file 'tests/scripts/mir-greeter.conf'
41--- tests/scripts/mir-greeter.conf 2014-03-19 21:29:07 +0000
42+++ tests/scripts/mir-greeter.conf 2014-05-28 16:18:36 +0000
43@@ -6,7 +6,7 @@
44 #?RUNNER DAEMON-START
45
46 # System compositor starts
47-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
48+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
49 #?*UNITY-SYSTEM-COMPOSITOR READY
50
51 # Greeter starts
52
53=== modified file 'tests/scripts/mir-session-compositor-crash.conf'
54--- tests/scripts/mir-session-compositor-crash.conf 2014-04-03 19:52:38 +0000
55+++ tests/scripts/mir-session-compositor-crash.conf 2014-05-28 16:18:36 +0000
56@@ -10,7 +10,7 @@
57 #?RUNNER DAEMON-START
58
59 # System compositor starts
60-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
61+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
62 #?*UNITY-SYSTEM-COMPOSITOR READY
63
64 # Session starts
65
66=== modified file 'tests/scripts/mir-session-crash.conf'
67--- tests/scripts/mir-session-crash.conf 2014-04-03 19:52:38 +0000
68+++ tests/scripts/mir-session-crash.conf 2014-05-28 16:18:36 +0000
69@@ -10,7 +10,7 @@
70 #?RUNNER DAEMON-START
71
72 # System compositor starts
73-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
74+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/lightdm-mir-0 VT=7 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=7
75 #?*UNITY-SYSTEM-COMPOSITOR READY
76
77 # Session starts
78
79=== modified file 'tests/scripts/mir-session.conf'
80--- tests/scripts/mir-session.conf 2014-04-03 19:52:38 +0000
81+++ tests/scripts/mir-session.conf 2014-05-28 16:18:36 +0000
82@@ -30,7 +30,7 @@
83 #?*GREETER-X-0 START-SESSION
84
85 # System compositor starts
86-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/lightdm-mir-0 VT=8 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=8
87+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/lightdm-mir-0 VT=8 ENABLE-HARDWARE-CURSOR=TRUE XDG_VTNR=8
88 #?*UNITY-SYSTEM-COMPOSITOR READY
89
90 # Switch to system compositor
91
92=== modified file 'tests/scripts/unity-autologin.conf'
93--- tests/scripts/unity-autologin.conf 2014-04-03 19:52:38 +0000
94+++ tests/scripts/unity-autologin.conf 2014-05-28 16:18:36 +0000
95@@ -11,7 +11,7 @@
96 #?RUNNER DAEMON-START
97
98 # System compositor starts
99-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
100+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
101 #?*UNITY-SYSTEM-COMPOSITOR READY
102
103 # X server starts
104
105=== modified file 'tests/scripts/unity-compositor-command.conf'
106--- tests/scripts/unity-compositor-command.conf 2014-03-17 18:33:02 +0000
107+++ tests/scripts/unity-compositor-command.conf 2014-05-28 16:18:36 +0000
108@@ -11,7 +11,7 @@
109 #?RUNNER DAEMON-START
110
111 # System compositor starts
112-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7 TEST=TRUE
113+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7 TEST=TRUE
114 #?*UNITY-SYSTEM-COMPOSITOR READY
115
116 # X server starts
117
118=== modified file 'tests/scripts/unity-compositor-crash.conf'
119--- tests/scripts/unity-compositor-crash.conf 2014-03-17 18:33:02 +0000
120+++ tests/scripts/unity-compositor-crash.conf 2014-05-28 16:18:36 +0000
121@@ -9,7 +9,7 @@
122 #?RUNNER DAEMON-START
123
124 # System compositor starts
125-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
126+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
127 #?*UNITY-SYSTEM-COMPOSITOR READY
128
129 # X server starts
130
131=== modified file 'tests/scripts/unity-compositor-fail-ready.conf'
132--- tests/scripts/unity-compositor-fail-ready.conf 2014-02-26 04:12:27 +0000
133+++ tests/scripts/unity-compositor-fail-ready.conf 2014-05-28 16:18:36 +0000
134@@ -10,7 +10,7 @@
135 #?RUNNER DAEMON-START
136
137 # System compositor starts but doesn't indicate it is ready
138-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
139+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
140
141 # Timeout and compositor is stopped
142 #?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
143
144=== modified file 'tests/scripts/unity-compositor-fail-start.conf'
145--- tests/scripts/unity-compositor-fail-start.conf 2014-02-26 04:12:27 +0000
146+++ tests/scripts/unity-compositor-fail-start.conf 2014-05-28 16:18:36 +0000
147@@ -12,7 +12,7 @@
148 #?RUNNER DAEMON-START
149
150 # System compositor fails to start
151-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
152+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
153 #?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
154
155 # Daemon exits with error code
156
157=== modified file 'tests/scripts/unity-compositor-fallback.conf'
158--- tests/scripts/unity-compositor-fallback.conf 2014-03-17 18:33:02 +0000
159+++ tests/scripts/unity-compositor-fallback.conf 2014-05-28 16:18:36 +0000
160@@ -12,11 +12,11 @@
161 #?RUNNER DAEMON-START
162
163 # System compositor fails to start
164-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
165+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
166 #?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
167
168 # System compositor fails to start a second time
169-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
170+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
171 #?UNITY-SYSTEM-COMPOSITOR EXIT CODE=1
172
173 # X server starts in VT mode
174
175=== modified file 'tests/scripts/unity-compositor-mir-next-session.conf'
176--- tests/scripts/unity-compositor-mir-next-session.conf 2014-04-03 19:52:38 +0000
177+++ tests/scripts/unity-compositor-mir-next-session.conf 2014-05-28 16:18:36 +0000
178@@ -12,7 +12,7 @@
179 #?RUNNER DAEMON-START
180
181 # System compositor
182-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
183+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
184 #?*UNITY-SYSTEM-COMPOSITOR READY
185
186 # Greeter session
187
188=== modified file 'tests/scripts/unity-compositor-next-session.conf'
189--- tests/scripts/unity-compositor-next-session.conf 2014-04-03 19:52:38 +0000
190+++ tests/scripts/unity-compositor-next-session.conf 2014-05-28 16:18:36 +0000
191@@ -12,7 +12,7 @@
192 #?RUNNER DAEMON-START
193
194 # System compositor
195-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
196+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
197 #?*UNITY-SYSTEM-COMPOSITOR READY
198
199 # Greeter session
200
201=== modified file 'tests/scripts/unity-login.conf'
202--- tests/scripts/unity-login.conf 2014-04-03 19:52:38 +0000
203+++ tests/scripts/unity-login.conf 2014-05-28 16:18:36 +0000
204@@ -10,7 +10,7 @@
205 #?RUNNER DAEMON-START
206
207 # System compositor starts
208-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
209+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
210 #?*UNITY-SYSTEM-COMPOSITOR READY
211
212 # X server starts
213
214=== modified file 'tests/scripts/unity-mir-autologin.conf'
215--- tests/scripts/unity-mir-autologin.conf 2014-04-03 19:52:38 +0000
216+++ tests/scripts/unity-mir-autologin.conf 2014-05-28 16:18:36 +0000
217@@ -11,7 +11,7 @@
218 #?RUNNER DAEMON-START
219
220 # System compositor starts
221-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
222+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
223 #?*UNITY-SYSTEM-COMPOSITOR READY
224
225 # Session starts
226
227=== modified file 'tests/scripts/unity-mir-greeter-mir-session.conf'
228--- tests/scripts/unity-mir-greeter-mir-session.conf 2014-04-03 19:52:38 +0000
229+++ tests/scripts/unity-mir-greeter-mir-session.conf 2014-05-28 16:18:36 +0000
230@@ -10,7 +10,7 @@
231 #?RUNNER DAEMON-START
232
233 # System compositor starts
234-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
235+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
236 #?*UNITY-SYSTEM-COMPOSITOR READY
237
238 # Greeter starts
239
240=== modified file 'tests/scripts/unity-mir-greeter-x-session.conf'
241--- tests/scripts/unity-mir-greeter-x-session.conf 2014-04-03 19:52:38 +0000
242+++ tests/scripts/unity-mir-greeter-x-session.conf 2014-05-28 16:18:36 +0000
243@@ -10,7 +10,7 @@
244 #?RUNNER DAEMON-START
245
246 # System compositor starts
247-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
248+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
249 #?*UNITY-SYSTEM-COMPOSITOR READY
250
251 # Greeter starts
252
253=== modified file 'tests/scripts/unity-mir-lock-seat.conf'
254--- tests/scripts/unity-mir-lock-seat.conf 2014-04-03 19:52:38 +0000
255+++ tests/scripts/unity-mir-lock-seat.conf 2014-05-28 16:18:36 +0000
256@@ -11,7 +11,7 @@
257 #?RUNNER DAEMON-START
258
259 # System compositor starts
260-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
261+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
262 #?*UNITY-SYSTEM-COMPOSITOR READY
263
264 # Session starts
265
266=== modified file 'tests/scripts/unity-mir-session-x-greeter.conf'
267--- tests/scripts/unity-mir-session-x-greeter.conf 2014-04-03 19:52:38 +0000
268+++ tests/scripts/unity-mir-session-x-greeter.conf 2014-05-28 16:18:36 +0000
269@@ -10,7 +10,7 @@
270 #?RUNNER DAEMON-START
271
272 # System compositor starts
273-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
274+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
275 #?*UNITY-SYSTEM-COMPOSITOR READY
276
277 # X server starts
278
279=== modified file 'tests/scripts/unity-mir-switch-to-user-resettable.conf'
280--- tests/scripts/unity-mir-switch-to-user-resettable.conf 2014-04-25 15:33:12 +0000
281+++ tests/scripts/unity-mir-switch-to-user-resettable.conf 2014-05-28 16:18:36 +0000
282@@ -14,7 +14,7 @@
283 #?RUNNER DAEMON-START
284
285 # System compositor starts
286-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
287+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
288 #?*UNITY-SYSTEM-COMPOSITOR READY
289
290 # Greeter starts
291
292=== modified file 'tests/scripts/unity-plymouth.conf'
293--- tests/scripts/unity-plymouth.conf 2014-04-03 19:52:38 +0000
294+++ tests/scripts/unity-plymouth.conf 2014-05-28 16:18:36 +0000
295@@ -21,7 +21,7 @@
296 #?PLYMOUTH QUIT RETAIN-SPLASH=TRUE
297
298 # System compositor starts
299-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
300+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
301 #?*UNITY-SYSTEM-COMPOSITOR READY
302
303 # X server starts
304
305=== modified file 'tests/scripts/unity-switch.conf'
306--- tests/scripts/unity-switch.conf 2014-04-03 19:52:38 +0000
307+++ tests/scripts/unity-switch.conf 2014-05-28 16:18:36 +0000
308@@ -11,7 +11,7 @@
309 #?RUNNER DAEMON-START
310
311 # System compositor starts
312-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
313+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
314 #?*UNITY-SYSTEM-COMPOSITOR READY
315
316 # X server starts
317
318=== modified file 'tests/scripts/unity-xdg-seat.conf'
319--- tests/scripts/unity-xdg-seat.conf 2014-04-03 19:52:38 +0000
320+++ tests/scripts/unity-xdg-seat.conf 2014-05-28 16:18:36 +0000
321@@ -12,7 +12,7 @@
322 #?RUNNER DAEMON-START
323
324 # System compositor starts
325-#?UNITY-SYSTEM-COMPOSITOR START FILE=/tmp/mir_socket VT=7 XDG_VTNR=7
326+#?UNITY-SYSTEM-COMPOSITOR START FILE=/run/mir_socket VT=7 XDG_VTNR=7
327 #?*UNITY-SYSTEM-COMPOSITOR READY
328
329 # X server starts

Subscribers

People subscribed via source and target branches