gdm

Merge lp:~vanvugt/gdm/fix-1704050 into lp:~ubuntu-desktop/gdm/ubuntu

Proposed by Daniel van Vugt
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 425
Merged at revision: 425
Proposed branch: lp:~vanvugt/gdm/fix-1704050
Merge into: lp:~ubuntu-desktop/gdm/ubuntu
Diff against target: 59 lines (+39/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/Avoid-double-NULL-terminated-array-LP-1704050.patch (+31/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~vanvugt/gdm/fix-1704050
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Jeremy Bícha Pending
Ubuntu Desktop Pending
Review via email: mp+327360@code.launchpad.net

Commit message

Avoid double-NULL terminated array (LP: #1704050)

If you then g_array_append_val wayland_search_dir you get:
   {..., NULL, wayland_search_dir, NULL}
and so the call to g_strdupv never finds wayland_search_dir. And then
Wayland logins don't work.

Neither G_N_ELEMENTS nor g_array_append_vals treat NULL as a special value. Only g_strdupv does.

Description of the change

Patch generated against upstream git so hopefully they will accept the same .patch file.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

+1, as discussed on IRC, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-07-12 14:08:20 +0000
3+++ debian/changelog 2017-07-13 08:40:36 +0000
4@@ -1,3 +1,10 @@
5+gdm3 (3.24.2-1ubuntu8) artful; urgency=medium
6+
7+ * Avoid double-NULL terminated array that breaks append operations
8+ and so prevents Wayland sessions from working (LP: #1704050)
9+
10+ -- Daniel van Vugt <daniel.van.vugt@canonical.com> Thu, 13 Jul 2017 16:29:46 +0800
11+
12 gdm3 (3.24.2-1ubuntu7) artful; urgency=medium
13
14 * debian/gdm3.config: Check the version of gdm3 instead of ubuntu-session.
15
16=== added file 'debian/patches/Avoid-double-NULL-terminated-array-LP-1704050.patch'
17--- debian/patches/Avoid-double-NULL-terminated-array-LP-1704050.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/Avoid-double-NULL-terminated-array-LP-1704050.patch 2017-07-13 08:40:36 +0000
19@@ -0,0 +1,31 @@
20+From cb8042fc87937abf80928b489d847128a38cd8a9 Mon Sep 17 00:00:00 2001
21+From: Daniel van Vugt <daniel.van.vugt@canonical.com>
22+Date: Thu, 13 Jul 2017 16:13:05 +0800
23+Subject: [PATCH] Avoid double-NULL terminated array (LP: #1704050)
24+
25+If you then g_array_append_val wayland_search_dir you get:
26+ {..., NULL, wayland_search_dir, NULL}
27+and so the call to g_strdupv never finds wayland_search_dir. And then
28+Wayland logins don't work.
29+
30+Neither G_N_ELEMENTS nor g_array_append_vals treat NULL as a special value.
31+Only g_strdupv does.
32+---
33+ daemon/gdm-session.c | 1 -
34+ 1 file changed, 1 deletion(-)
35+
36+diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
37+index ff3a1acb..0b832231 100644
38+--- a/daemon/gdm-session.c
39++++ b/daemon/gdm-session.c
40+@@ -348,7 +348,6 @@ get_system_session_dirs (GdmSession *self)
41+ DMCONFDIR "/Sessions/",
42+ DATADIR "/gdm/BuiltInSessions/",
43+ DATADIR "/xsessions/",
44+- NULL
45+ };
46+
47+ static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
48+--
49+2.11.0
50+
51
52=== modified file 'debian/patches/series'
53--- debian/patches/series 2017-07-12 08:34:37 +0000
54+++ debian/patches/series 2017-07-13 08:40:36 +0000
55@@ -12,3 +12,4 @@
56 ubuntu_config_error_dialog.patch
57 revert_drop_gdm_shell_session.patch
58 ubuntu_prefer_x11_session.patch
59+Avoid-double-NULL-terminated-array-LP-1704050.patch

Subscribers

People subscribed via source and target branches