Merge lp:~bregma/unity8/lp-1350878 into lp:unity8

Proposed by Stephen M. Webb
Status: Rejected
Rejected by: Stephen M. Webb
Proposed branch: lp:~bregma/unity8/lp-1350878
Merge into: lp:unity8
Diff against target: 13 lines (+3/-0)
1 file modified
tests/mocks/LightDM/demo/GreeterPrivate.cpp (+3/-0)
To merge this branch: bzr merge lp:~bregma/unity8/lp-1350878
Reviewer Review Type Date Requested Status
Michael Terry Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+231248@code.launchpad.net

Commit message

Avoid multiple concurrent authentications.

Description of the change

Hacks around the critical blocker preventing Unity 8 from running on the desktop.

The existing code starts authentication on the user twice. the second authentication session destroys the context of the first, leaves its future dangling, and makes non-threadsafe calls into non-reentrant code.

This fix is quick and dirty but gets the desktop back up and running while someone who understands the overall flow better can dream up a proper solution on a more leisurely schedule while not blocking other development.

To post a comment you must log in.
lp:~bregma/unity8/lp-1350878 updated
1180. By Stephen M. Webb

reverse ifdef sense to enable fix

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :
review: Disapprove
Revision history for this message
kevin gunn (kgunn72) wrote :

bregma if you or someone on your team reviews mterry's then i'll see if we can add it to the current silo

Unmerged revisions

1180. By Stephen M. Webb

reverse ifdef sense to enable fix

1179. By Stephen M. Webb

PAM authentication: don't slay non-reentrant code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/mocks/LightDM/demo/GreeterPrivate.cpp'
--- tests/mocks/LightDM/demo/GreeterPrivate.cpp 2014-07-15 16:38:02 +0000
+++ tests/mocks/LightDM/demo/GreeterPrivate.cpp 2014-08-18 19:21:10 +0000
@@ -58,6 +58,9 @@
58 // Clear out any existing PAM interactions first (we can't simply58 // Clear out any existing PAM interactions first (we can't simply
59 // cancel our QFuture because QtConcurrent::run doesn't support cancel)59 // cancel our QFuture because QtConcurrent::run doesn't support cancel)
60 if (pamHandle != NULL) {60 if (pamHandle != NULL) {
61#ifndef DONT_HANG_DESKTOP
62 return;
63#endif
61 pam_handle *handle = pamHandle;64 pam_handle *handle = pamHandle;
62 pamHandle = NULL; // to disable normal finishPam() handling65 pamHandle = NULL; // to disable normal finishPam() handling
63 while (respond(QString())); // clear our local queue of QFutures66 while (respond(QString())); // clear our local queue of QFutures

Subscribers

People subscribed via source and target branches