Review Request 124915: [screenlocker] Add emergency mode for greeter crashing

Martin Gräßlin mgraesslin at kde.org
Tue Aug 25 10:22:17 UTC 2015



> On Aug. 25, 2015, 12:15 p.m., David Edmundson wrote:
> > ksmserver/screenlocker/lockwindow.cpp, line 84
> > <https://git.reviewboard.kde.org/r/124915/diff/1/?file=397976#file397976line84>
> >
> >     that's 
> >     sudo loginctl...
> >     
> >     doing it as a normal user will give an error.

I tried that a hundred times today, everytime without sudo: loginctl prompts for the password.

I don't want to ask for sudo as sudo might not be used by the distribution.


> On Aug. 25, 2015, 12:15 p.m., David Edmundson wrote:
> > ksmserver/screenlocker/lockwindow.cpp, line 85
> > <https://git.reviewboard.kde.org/r/124915/diff/1/?file=397976#file397976line85>
> >
> >     that's f1 for normal distros....
> >     
> >     
> >     maybe we can use either ttyname() here?
> >     
> >     
> >     or qgetenv("XDG_VTNR")?

since when do distros use f1? It used to be f7 for all of my linux life. Anyway, I can change to use XDG_VTNR.


> On Aug. 25, 2015, 12:15 p.m., David Edmundson wrote:
> > ksmserver/screenlocker/lockwindow.cpp, line 93
> > <https://git.reviewboard.kde.org/r/124915/diff/1/?file=397976#file397976line93>
> >
> >     FYI for future
> >     
> >     Qt::AlignCenter = 	AlignVCenter | AlignHCenter

For the record: I'm aware of it. But this bite me bad with QtQuick, so in future I'll always do the explicit one ;-)


> On Aug. 25, 2015, 12:15 p.m., David Edmundson wrote:
> > ksmserver/screenlocker/lockwindow.cpp, line 123
> > <https://git.reviewboard.kde.org/r/124915/diff/1/?file=397976#file397976line123>
> >
> >     I don't understand why this exists?
> >     
> >     
> >     I think it says:
> >     If the emergency background was visible at the time we try to show the emergency background then we stop blocking suspend

I need to test again: it might not be needed.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124915/#review84325
-----------------------------------------------------------


On Aug. 25, 2015, 11:16 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124915/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2015, 11:16 a.m.)
> 
> 
> Review request for Plasma and David Edmundson.
> 
> 
> Bugs: 351696
>     https://bugs.kde.org/show_bug.cgi?id=351696
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> If the greeter crashes on startup ksld is caught in a restart loop which
> causes 100 % CPU usage and makes it impossible to unlock the session.
> 
> With this change the greeter is only allowed to crash four times and
> ksld goes into an emergency mode. This mode ensures that our black
> background window gets shown with a message indicating how to unlock
> using loginctl. This is rather technical but better than leaving the
> system in a state which makes it impossible to unlock.
> 
> Directly unlocking in the error case is not an option as that could
> be used to attack the screen locker infrastructure.
> 
> BUG: 351696
> 
> 
> Diffs
> -----
> 
>   ksmserver/screenlocker/autotests/CMakeLists.txt 44bbd97add6f5c9b2f83f9f2f825fa3c904e45c5 
>   ksmserver/screenlocker/ksldapp.h 03ca2580ffc564cde033f3eeb2c81f77179a0bde 
>   ksmserver/screenlocker/ksldapp.cpp d0636b8785101cb9896cea6399952dac0e4cd227 
>   ksmserver/screenlocker/lockwindow.h 265699a9789703ad099eee043a14d4700e90c243 
>   ksmserver/screenlocker/lockwindow.cpp 41af0e23f8442d75b7295debe50d9b29fbda7e7a 
>   ksmserver/screenlocker/tests/CMakeLists.txt 613ec7b2eead38b36e7805804f25ed93b4ef7a68 
> 
> Diff: https://git.reviewboard.kde.org/r/124915/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> Emergency mode
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/08/25/d90fa1f2-4400-4407-92f6-7d3dff49b3ed__screenlocker-emergency.png
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150825/f18db6f1/attachment-0001.html>


More information about the Plasma-devel mailing list