Merge lp:~nikwen/account-polld/no-user-interaction into lp:~ubuntu-push-hackers/account-polld/trunk

Proposed by Niklas Wenzel
Status: Merged
Approved by: Jonas G. Drange
Approved revision: 138
Merged at revision: 139
Proposed branch: lp:~nikwen/account-polld/no-user-interaction
Merge into: lp:~ubuntu-push-hackers/account-polld/trunk
Diff against target: 22 lines (+9/-1)
1 file modified
accounts/account-watcher.c (+9/-1)
To merge this branch: bzr merge lp:~nikwen/account-polld/no-user-interaction
Reviewer Review Type Date Requested Status
Jonas G. Drange (community) Approve
Alberto Mardegan (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+272309@code.launchpad.net

Commit message

Tell libsignon-glib not to open a trust session by passing SIGNON_POLICY_NO_USER_INTERACTION as the SIGNON_SESSION_DATA_UI_POLICY value (part of the issue experienced in LP: #1496773)

Description of the change

Tell libsignon-glib not to open a trust session by passing SIGNON_POLICY_NO_USER_INTERACTION as the SIGNON_SESSION_DATA_UI_POLICY value.

I tested this and normal operation seems to work fine. I didn't have a way of reproducing the linked bug report though.

To post a comment you must log in.
Revision history for this message
Alberto Mardegan (mardy) wrote :

LGTM, thanks a lot!! :-)

review: Approve
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

LGTM, works well.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'accounts/account-watcher.c'
2--- accounts/account-watcher.c 2015-03-20 14:34:48 +0000
3+++ accounts/account-watcher.c 2015-09-24 20:10:19 +0000
4@@ -155,9 +155,17 @@
5 return;
6 }
7
8+ /* Tell libsignon-glib not to open a trust session as we have no UI */
9+ GVariantBuilder builder;
10+ g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT);
11+ g_variant_builder_add(&builder, "{sv}",
12+ SIGNON_SESSION_DATA_UI_POLICY,
13+ g_variant_new_int32(SIGNON_POLICY_NO_USER_INTERACTION));
14+
15 info->auth_params = g_variant_ref_sink(
16 ag_auth_data_get_login_parameters(
17- auth_data, NULL));
18+ auth_data,
19+ g_variant_builder_end(&builder)));
20
21 signon_auth_session_process_async(
22 info->session,

Subscribers

People subscribed via source and target branches