<table><tr><td style="">secureworkstation created this revision.<br />secureworkstation added projects: Frameworks, Plasma.<br />Herald added a subscriber: plasma-devel.<br />secureworkstation requested review of this revision.
</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/D26979">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch is a repurposed patch by Daniel Walsh for gnome-keyring:</p>

<p><a href="https://github.com/GNOME/gnome-keyring/commit/2f6a7c049dfffed20e3f78e3f51a8cca8735f2d3" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/GNOME/gnome-keyring/commit/2f6a7c049dfffed20e3f78e3f51a8cca8735f2d3</a><br />
<a href="https://github.com/GNOME/gnome-keyring/commit/74fc065e3c3e04a5cd5dfa0e725f7664825a5b1e" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/GNOME/gnome-keyring/commit/74fc065e3c3e04a5cd5dfa0e725f7664825a5b1e</a><br />
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=684225" class="remarkup-link" target="_blank" rel="noreferrer">https://bugzilla.redhat.com/show_bug.cgi?id=684225</a></p>

<p>In short, for most (if not all) existing users this patch should do nothing: for those without SELinux, for those with SELinux disabled and for those with SELinux enabled in default settings. One would need to construct a policy and no such policy currently exists (but I'm working on one for Fedora and it's not a trivial job).</p>

<p>SELinux works on labels given to processes and objects like files. Without this patch, pam_selinux (the PAM module, not this patch) transitions to the default user label which is used to launch kwalletd5 process by pam_kwallet. For me it's suboptimal, because I want to give it a dedicated label to further confine the process for security purposes. KWallet launched by user (not PAM) transitions correctly, it is just the PAM launch that requires special code.</p>

<p>Ideally that could be a start to sandbox a lot more of Plasma using SELinux.</p>

<p>Tracking bug on fedora-selinux Github on more work on confining Plasma using SELinux: <a href="https://github.com/fedora-selinux/selinux-policy-contrib/issues/192" class="remarkup-link" target="_blank" rel="noreferrer">https://github.com/fedora-selinux/selinux-policy-contrib/issues/192</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Make sure it compiles on machines without SELinux [done]</li>
<li class="remarkup-list-item">Make sure it doesn't break SELinux-disabled installations [help wanted]</li>
<li class="remarkup-list-item">Make sure it doesn't break vanilla SELinux installations [pending]</li>
<li class="remarkup-list-item">Make sure it transitions to the correct label if a correct policy is present [done]</li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>R107 KWallet PAM Integration</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26979">https://phabricator.kde.org/D26979</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
pam_kwallet.c<br />
pam_selinux.c<br />
pam_selinux.h</div></div></div><br /><div><strong>To: </strong>secureworkstation<br /><strong>Cc: </strong>plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, michaelh, ZrenBot, ngraham, bruns, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>