<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/117091/">https://git.reviewboard.kde.org/r/117091/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 22nd, 2014, 5:34 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/117091/diff/2/?file=262501#file262501line89" style="color: black; font-weight: bold; text-decoration: underline;">ksmserver/screenlocker/greeter/main.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int main(int argc, char* argv[])</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">89</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">struct</span> <span class="n">sigaction</span> <span class="n">sa</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ooc.: what's wrong about just:
signal(SIGUSR1, signalHandler); ?</pre>
</blockquote>
<p>On April 22nd, 2014, 7:28 p.m. UTC, <b>Wolfgang Bauer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">signal() is deprecated, according to its manpage. "man signal" even says:
The behavior of signal() varies across UNIX versions, and has also var-
ied historically across different versions of Linux. Avoid its use:
use sigaction(2) instead. See Portability below.</pre>
</blockquote>
<p>On April 22nd, 2014, 7:45 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">the posix manpage does of course not state that ... luckily it wraps around sigaction on BSD defaults on "modern" glibc systems - pfeew ;-)
sigaction(SIGUSR1, &sa, NULL); // for later nullptr
i doubt that you'll need another update for that, though.</pre>
</blockquote>
<p>On April 22nd, 2014, 8:03 p.m. UTC, <b>Wolfgang Bauer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well, should I change it?
In kscreensaver/libkscreensaver/main.cpp they used sigaction() as well.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">0 -> NULL: yes.
sigaction -> signal: no.
it just doesn't seem too much of a problem that I've constantly been using signal() whenever i needed it ;-)</pre>
<br />
<p>- Thomas</p>
<br />
<p>On April 22nd, 2014, 7:56 p.m. UTC, Wolfgang Bauer wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kde-workspace, Plasma and Aaron J. Seigo.</div>
<div>By Wolfgang Bauer.</div>
<p style="color: grey;"><i>Updated April 22, 2014, 7:56 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=327947">327947</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=329076">329076</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-workspace
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If the screen locker is set to not require a password to unlock, it will not show the password input field even when the powermanagement settings suspend the system and are set to require a password after resume (when it was already running at that point).
This locks people out of their system.
This patch adds a signal handler for SIGUSR1 that switches the running greeter to immediateLock mode. The locker sends that signal to make sure the greeter shows the password input field when necessary.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Disable "Require password after" in the screen locker settings (the default), set it to start after 1 min. (for easier testing).
Enable "Suspend session after" and set it to 2 minutes. (set the action to "Suspend", "Hibernate", or "Lock Screen", doesn't matter)
Make sure "Lock screen on resume" is enabled in the powermanagements "Advanced Options" (it is by default).
After 1 minute the screen locker kicks in, and doesn't require a password.
After 2 minutes the session gets suspended, hibernated or locked, and requires a password to resume.
Without this patch no password dialog is shown, the user cannot resume the session by entering the password.
With this patch this works: there is a password input field, the session is unlocked when the user enters the password.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>ksmserver/screenlocker/greeter/greeterapp.h <span style="color: grey">(8b79188)</span></li>
<li>ksmserver/screenlocker/greeter/greeterapp.cpp <span style="color: grey">(c5e2f85)</span></li>
<li>ksmserver/screenlocker/greeter/main.cpp <span style="color: grey">(d898734)</span></li>
<li>ksmserver/screenlocker/ksldapp.cpp <span style="color: grey">(3dfcc9e)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117091/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>