Merge lp:~azzar1/unity/lp-1552537-trusty into lp:unity/7.2

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3838
Merged at revision: 3838
Proposed branch: lp:~azzar1/unity/lp-1552537-trusty
Merge into: lp:unity/7.2
Diff against target: 17 lines (+6/-2)
1 file modified
lockscreen/LockScreenController.cpp (+6/-2)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1552537-trusty
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+290991@code.launchpad.net

Commit message

Don't use SetActivate from gnome-screensaver as it will not only deactivate the screensaver but also unlock the screen.

Description of the change

Don't use SetActivate from gnome-screensaver as it will not only deactivate the screensaver but also unlock the screen.

To post a comment you must log in.
lp:~azzar1/unity/lp-1552537-trusty updated
3838. By Andrea Azzarone

Don't call SetActive only if activate is FALSE.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Grazie...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lockscreen/LockScreenController.cpp'
2--- lockscreen/LockScreenController.cpp 2015-05-15 19:39:03 +0000
3+++ lockscreen/LockScreenController.cpp 2016-04-05 17:21:07 +0000
4@@ -415,8 +415,12 @@
5 {
6 if (Settings::Instance().use_legacy())
7 {
8- auto proxy = std::make_shared<glib::DBusProxy>("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver");
9- proxy->CallBegin("SetActive", g_variant_new("(b)", activate != FALSE), [proxy] (GVariant*, glib::Error const&) {});
10+ // SetActive(FALSE) will unlock the screen. This used to cause security issues (see lp:1552537).
11+ if (activate)
12+ {
13+ auto proxy = std::make_shared<glib::DBusProxy>("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver");
14+ proxy->CallBegin("SetActive", g_variant_new("(b)", TRUE), [proxy] (GVariant*, glib::Error const&) {});
15+ }
16 return;
17 }
18

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: