Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 436948 - kde-base/kdebase-pam selinux support
Summary: kde-base/kdebase-pam selinux support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 10:04 UTC by vespian
Modified: 2013-05-03 21:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of emerge --info (file_436948.txt,7.48 KB, text/plain)
2012-10-02 10:04 UTC, vespian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vespian 2012-10-02 10:04:42 UTC
Created attachment 325524 [details]
Output of emerge --info

Hi,



hope that this is not duplicate or something stupid, but recently I have migrated to SELinux profile: default/linux/amd64/10.0/selinux.

I have noticed that my context after opening an konsole terminal is:

system_u:system_r:xdm_t

which effectively prohibited me from changing to staff_r/sysadm_r via newrole.

I googled a bit and found a solution/gentoo BUG 393329:

http://gentoo.2317880.n4.nabble.com/Gnome-wrong-Selinux-user-role-td160492.html
https://393329.bugs.gentoo.org/attachment.cgi?id=294905

I have applied it to /etc/pam.d/kde and now the context is correct:

staff_u:staff_r:staff_t

Shouldn't it be made default for KDE to ?



Thx for a reply.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2012-10-03 20:15:20 UTC
There's another bug lingering somewhere about including the system-login pam configuration in other pam configs (like kdm/xdm) to automatically inherit the SELinux stuff. Perhaps that's a possibility here as well?
Comment 2 Johannes Huber (RETIRED) gentoo-dev 2012-10-14 08:52:41 UTC
Thanks for reporting. New version masked in kde overlay available. Please note that this version bump addresses bug #422495 also.

http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=bb0a90872c54b1a4314bed80d69e9763582cd44c
Comment 3 Johannes Huber (RETIRED) gentoo-dev 2012-10-28 10:40:08 UTC
(In reply to comment #2)
> Thanks for reporting. New version masked in kde overlay available. Please
> note that this version bump addresses bug #422495 also.
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;
> h=bb0a90872c54b1a4314bed80d69e9763582cd44c

Unmasked in overlay. Please give feedback.
Comment 4 Dennis Schridde 2012-11-01 14:17:27 UTC
This appears to break my kwallet.

Syslog has following messages:
Nov 01 14:41:57 [kcheckpass] PAM unable to dlopen(/lib64/security/pam_selinux.so): /lib64/security/pam_selinux.so: cannot open shared object file: No such file or directory
Nov 01 14:41:57 [kcheckpass] PAM adding faulty module: /lib64/security/pam_selinux.so

It lists the same message earlier for kdm.

In addition I get a message box when KDM starts, that it is going to login my user. This was not there previously.

I use autologin without a password.
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2012-11-10 17:59:15 UTC
Yes, referencing a pam module in the configuration files requires that the module is available / exists, regardless of the call (optional/required/requisite/...). I also couldn't find a directive to have it being ignored.

Would it make sense to include system-login? If we have a SELinux profile, then we patch system-login to call the pam_selinux.so. And if not, then we don't. By including the system-login PAM configuration, you can abstract yourself from the SELinux stuff.

*But* you must make sure that the content of system-login (for PAM) matches what you want. After all, we are talking about authentication here, don't want to mess that up...
Comment 6 vespian 2013-02-01 23:54:39 UTC
Better late than never :)

Ebuild works for me.
Comment 7 Johannes Huber (RETIRED) gentoo-dev 2013-05-03 21:06:15 UTC
Thanks all, overlay version is moved to the tree.

+  03 May 2013; Johannes Huber <johu@gentoo.org> +files/kde-np.pam-9,
+  +files/kde.pam-9, +kdebase-pam-9.ebuild:
+  Version bump, fixes bugs #422495, #436948. Thanks to all who were involved.