<table><tr><td style="">graesslin created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4997" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>So far kcheckpass allowed to try to verify one password. This required<br />
kscreenlocker_greet to exec for every new entered password. Due to that<br />
we cannot enable seccomp in kscreenlocker_greet.</p>
<p>This change prepares for supporting seccomp by making it possible to<br />
have a long living kcheckpass with multiple authentications. For that<br />
the interaction is changed:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">kcheckpass gets started without going into Authenticate directly</li>
<li class="remarkup-list-item">kcheckpass uses a signalfd for waiting on sigusr1 and sigusr2</li>
<li class="remarkup-list-item">kcheckpass goes into a loop for authentication<ul class="remarkup-list">
<li class="remarkup-list-item">signals parent process through socket that it is ready for auth</li>
<li class="remarkup-list-item">waits for signal</li>
<li class="remarkup-list-item">on sigusr1 starts to authenticate</li>
<li class="remarkup-list-item">on sigusr2 goes out of loop</li>
<li class="remarkup-list-item">after authenticate goes into next loop run to continue</li>
</ul></li>
</ul>
<p>For the authenticator in kscreenlocker_greet the main change is to<br />
send the signal to kcheckpass when it wants to authenticate.</p>
<p>In addition the authenticator supports both a delayed and a direct<br />
mode. In the delayed case kcheckpass gets started directly on startup<br />
for the long living process. In the direct mode it starts kcheckpass<br />
when going into authenticate. We need both modes as kcheckpass is not<br />
supposed to use the long living process when it is setuid root.</p>
<p>For the moment kscreenlocker_greet by default still uses the direct<br />
interaction. This will change when seccomp integration is added.</p>
<p>The test application gained a new command line switch to use either<br />
direct or delayed authentication.</p></div></div><br /><div><strong>BRANCH</strong><div><div>kcheckpass-sigusr</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4997" rel="noreferrer">https://phabricator.kde.org/D4997</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>greeter/authenticator.cpp<br />
greeter/authenticator.h<br />
greeter/autotests/authenticatortest.cpp<br />
greeter/greeterapp.cpp<br />
kcheckpass/kcheckpass-enums.h<br />
kcheckpass/kcheckpass.c<br />
tests/kcheckpass_test.cpp</div></div></div><br /><div><strong>To: </strong>graesslin, Plasma<br /><strong>Cc: </strong>plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>