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

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4101
Proposed branch: lp:~azzar1/unity/lp-1552537
Merge into: lp:unity
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
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+290976@code.launchpad.net

Commit message

LockscreenController: Don't use SetActivate(False) for gnome-screensaver to prevent unlocking on tty switch.
It will not only deactivate the screensaver but also unlock the screen.

Description of the change

LockscreenController: Don't use SetActivate(False) for gnome-screensaver to prevent unlocking on tty switch.
It will not only deactivate the screensaver but also unlock the screen.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Bella lì!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lockscreen/LockScreenController.cpp'
--- lockscreen/LockScreenController.cpp 2016-03-31 09:59:30 +0000
+++ lockscreen/LockScreenController.cpp 2016-04-05 17:16:44 +0000
@@ -426,8 +426,12 @@
426{426{
427 if (Settings::Instance().use_legacy())427 if (Settings::Instance().use_legacy())
428 {428 {
429 auto proxy = std::make_shared<glib::DBusProxy>("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver");429 // SetActive(FALSE) will unlock the screen. This used to cause security issues (see lp:1552537).
430 proxy->CallBegin("SetActive", g_variant_new("(b)", activate != FALSE), [proxy] (GVariant*, glib::Error const&) {});430 if (activate)
431 {
432 auto proxy = std::make_shared<glib::DBusProxy>("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver");
433 proxy->CallBegin("SetActive", g_variant_new("(b)", TRUE), [proxy] (GVariant*, glib::Error const&) {});
434 }
431 return;435 return;
432 }436 }
433437