Merge lp:~laney/ubiquity/lp1767067 into lp:ubiquity

Proposed by Iain Lane
Status: Merged
Merged at revision: 6639
Proposed branch: lp:~laney/ubiquity/lp1767067
Merge into: lp:ubiquity
Diff against target: 101 lines (+30/-25)
3 files modified
debian/changelog (+14/-1)
ubiquity/frontend/gtk_ui.py (+16/-9)
ubiquity/plugins/ubi-language.py (+0/-15)
To merge this branch: bzr merge lp:~laney/ubiquity/lp1767067
Reviewer Review Type Date Requested Status
Ubuntu Installer Team Pending
Review via email: mp+344482@code.launchpad.net
To post a comment you must log in.

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 2018-04-26 14:09:06 +0000
3+++ debian/changelog 2018-04-26 14:38:23 +0000
4@@ -1,7 +1,20 @@
5+ubiquity (18.04.14) UNRELEASED; urgency=medium
6+
7+ * Revert the previous upload. It didn't actually *fix* all cases, just
8+ papered over them. If the race was lost, the screen reader still didn't
9+ work in ubiquity-dm mode.
10+ * Move the Gio.Settings code into the constructor of the wizard. This runs
11+ with dropped privileges (uid = 0, euid = 999) whereas run() runs as root
12+ (uid = 0, euid = 0). When run as 0 / 0, dconf creates its
13+ XDG_RUNTIME_DIR/dconf/user database as root. We need to ensure that it
14+ runs in a context with dropped privileges. (LP: #1767067)
15+
16+ -- Iain Lane <iain.lane@canonical.com> Thu, 26 Apr 2018 15:26:20 +0100
17+
18 ubiquity (18.04.13) bionic; urgency=medium
19
20 [ Dimitri John Ledkov ]
21- * Remove dconf/user before Try Ubuntu. LP: #1767067
22+ * Remove dconf/user before Try Ubuntu.
23 Just, in case it has the wrong permissions, i.e. root and thus breaks
24 user running gnome session / shell / "Try Ubuntu".
25
26
27=== modified file 'ubiquity/frontend/gtk_ui.py'
28--- ubiquity/frontend/gtk_ui.py 2018-04-25 09:32:33 +0000
29+++ ubiquity/frontend/gtk_ui.py 2018-04-26 14:38:23 +0000
30@@ -254,6 +254,22 @@
31 if 'access=v3' in fp.read():
32 self.screen_reader = True
33
34+ if 'UBIQUITY_ONLY' in os.environ:
35+ # do not wrap this in drop / regain permissions. The API pretends to
36+ # be synchronous but it is actually asynchronous. If you become root
37+ # before it finishes then D-Bus will reject our connection due to a
38+ # mismatched user between the requestor and the owner of the session
39+ # bus.
40+
41+ # handle orca only in ubiquity-dm where there is no gnome-session
42+ self.a11y_settings = Gio.Settings.new(
43+ "org.gnome.desktop.a11y.applications")
44+ self.a11y_settings.connect("changed::screen-reader-enabled",
45+ on_screen_reader_enabled_changed)
46+ # enable if needed and a key read is needed to connect the signal
47+ on_screen_reader_enabled_changed(self.a11y_settings,
48+ "screen-reader-enabled")
49+
50 # set default language
51 self.locale = i18n.reset_locale(self)
52
53@@ -723,15 +739,6 @@
54 self.disable_powermgr()
55
56 if 'UBIQUITY_ONLY' in os.environ:
57- # handle orca only in ubiquity-dm where there is no gnome-session
58- self.a11y_settings = Gio.Settings.new(
59- "org.gnome.desktop.a11y.applications")
60- self.a11y_settings.connect("changed::screen-reader-enabled",
61- on_screen_reader_enabled_changed)
62- # enable if needed and a key read is needed to connect the signal
63- on_screen_reader_enabled_changed(self.a11y_settings,
64- "screen-reader-enabled")
65-
66 self.disable_logout_indicator()
67 if 'UBIQUITY_DEBUG' not in os.environ:
68 self.disable_terminal()
69
70=== modified file 'ubiquity/plugins/ubi-language.py'
71--- ubiquity/plugins/ubi-language.py 2018-04-26 14:02:30 +0000
72+++ ubiquity/plugins/ubi-language.py 2018-04-26 14:38:23 +0000
73@@ -27,7 +27,6 @@
74
75 from ubiquity import auto_update, i18n, misc, osextras, plugin
76
77-import subprocess
78
79 NAME = 'language'
80 AFTER = None
81@@ -136,20 +135,6 @@
82 # The button's already been clicked once, so stop reacting to it.
83 # LP: #911907.
84 return
85- # Sometimes dconf/user ends up being written by root, despite being
86- # written to some user's XDG_RUNTIME_DIRECTORY later breaking
87- # gnome session/shell/starting desktop
88- # Thus log the permission of the file, and purge it, to ensure the
89- # session reliably starts
90- uid = os.environ.get('PKEXEC_UID', os.environ.get('SUDO_UID'))
91- if uid:
92- dconf_user = '/run/user/%s/dconf/user' % uid
93- if os.path.exists(dconf_user):
94- subprocess.run(['systemd-run', 'ls', '-latr', dconf_user])
95- try:
96- os.remove(dconf_user)
97- except OSError:
98- pass
99 # Spinning cursor.
100 self.controller.allow_change_step(False)
101 # Queue quit.

Subscribers

People subscribed via source and target branches

to status/vote changes: